Posts

Showing posts from April, 2021

Modify Screen as per the selection Screen

We can modify screen as per the selection screen FORM f_modify_screen . * IF p_calim IS NOT INITIAL. * LOOP AT SCREEN. * IF screen-group1 EQ 'M1'. * screen-active = '0'. * screen-input = '0'. * MODIFY SCREEN. * ENDIF. * ENDLOOP. * ENDIF. *IF sy-ucomm EQ 'ONLI'. LOOP AT SCREEN. IF screen-group1 = 'M1'. IF p_calim = 'X'. screen-active = '0'. ELSE. screen-active = '1'. ENDIF. MODIFY SCREEN. ENDIF. ENDLOOP. *ENDIF. LOOP AT SCREEN. IF screen-group1 = 'M2'. IF P_Recept = 'X'. screen-active = '0'. ELSE. screen-active = '1'. ENDIF. MODIFY SCREEN. ENDIF. ENDLOOP. ENDFORM. SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001. select-OPTIONS: s_BUKRS FOR bsid-bukrs NO-EXTENSION NO INTERVALS OBLIGATORY, s_KUNNR F

Send Mail and Commit The Records

* Send Mail CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1' EXPORTING document_data = lt_mailsubject TABLES object_content = lt_mailtxt receivers = lt_mailrecipients EXCEPTIONS too_many_receivers = 1 document_not_sent = 2 document_type_not_exist = 3 operation_no_authorization = 4 parameter_error = 5 x_error = 6 enqueue_error = 7 OTHERS = 8. IF sy-subrc EQ 0. COMMIT WORK. * Push mail out from SAP outbox SUBMIT rsconn01 WITH mode = 'INT' AND RETURN. ENDIF. ********************************ROHINI KUMAR*********************************                                 Please support my work : sap.rohini988@gmail.com                                LinkedIn Link  :  https://www.linkedin.com/in/rohini-kumar-14647a13a/ **************

Submit Reports

FBL5N loop at t_fbl5n into st_fbl5n CALL 'LIST_FREE_MEMORY'. SUBMIT rfitemar WITH dd_bukrs EQ st_fbl5n-bukrs WITH dd_hkont EQ st_fbl5n-hkont WITH x_opsel EQ 'X' WITH pa_stida EQ vl_datum WITH pa_vari EQ st_fbl5n-alv_layout WITH x_norm EQ 'X' WITH x_shbv EQ 'X' EXPORTING LIST TO MEMORY AND RETURN. CALL FUNCTION 'LIST_FROM_MEMORY' TABLES listobject = list_tab EXCEPTIONS not_found = 1 OTHERS = 2. CHECK sy-subrc = 0. *Converting to ASCII CALL FUNCTION 'LIST_TO_ASCI' TABLES listasci = t_tab2 listobject = list_tab EXCEPTIONS empty_list = 1 list_index_invalid = 2. CHECK sy-subrc <> 0. * Start of processing of the INTERNAL TABLE t_tab2. ENDLOOP. DATA: p