Posts

Showing posts from 2023

Call BP Transaction by passing Business partner number

Use the Below code to call BP Transaction in the place of obsolete Customer/Vendor related transactions in  SAP.   DATA:     lv_request TYPE REF TO cl_bupa_navigation_request,     lv_options TYPE REF TO cl_bupa_dialog_joel_options,     lv_partner TYPE bu_partner,     lv_partner_role TYPE bus_roles,     lv_start_tab TYPE BUS_NAVIGATION-BUPA-SUB_HEADER_TAB,     lv_bup_main TYPE bus_bupr_maintenance. * set start-up navigation-----------------------------------------------   lv_partner = <fs_row>-kunnr.   lv_partner_role-role = 'FLCU01'.  “ Pass the Role   lv_start_tab = 'CVIC01'.          “ Start tab   CREATE OBJECT lv_request. *set partner maintenance   CALL METHOD lv_request->set_maintenance_id     EXPORTING       iv_value = lv_request->gc_maintenance_id_partner. *set partner number to start with (in case of a guid just use the method *set_partner_guid)   CALL METHOD lv_request->set_partner_number( im_partner ). “ pass BP number from input *set the partne

String Functions in SAP ABAP ( New way of using string operations )

STRING FUNCTIONS in SAP ABAP: sap has added some interesting new string functions from versions 7.2. In few cases the new functions replace previous ABAP commands. List of useful string functions: 1.CONCATENATE: Purpose: it combines two or more separate strings into one. Syntax *<output string> = |{ string value }| & | | & |{ string2 value }|. Example: REPORT yabap0006.  DATA(str1) = 'Welcome to SAP'. DATA(str2) = 'Team'.  DATA(result) = |{ str1 }| & | | & |{ str2 }|. " Concatenate with space  DATA(result) = |{ str1 }| & |{ str2 }|. " concatenate without space WRITE result. Or we can use the new way concatenate as below: *&concatenate strings while displaying output  *write: / |{ string value } { string2 value }|   " Concatenate with space  write: / |{ str1 } { str2 }|. "Concatenate with space write: / str1 && str2. "concatenate without space Output: 1.welcome to sap team. 2.welcome to sapteam. 2.CONDENSE: P