* We use APPEND statement to insert the records at the last of the internal table. * In SAP ABAP new syntax, we can use VALUE expression instead of APPEND statement. * Value expression is a powerful mechanism to declare as well as initialize the internal tables. * It is a powerful utility where we can achieve the result with minimal coding. * Value expression is of 2 types. - Define the type before using it with VALUE keyword. The type defined is structure type or table type. - Using # character for type and use it with VALUE keyword. Report REPORT zab_rp_append_value . TYPES : BEGIN OF ls_stu , st_id ( 10 ) TYPE n , st_name ( 15 ) TYPE c , END OF ls_stu . DATA : lt_stu TYPE TABLE...
* Before ABAP 7.4, we used READ TABLE statement to read the first matching record from the internal table based upon key or index . * In SAP ABAP new syntax, instead of READ TABLE , we can use the table expressions. * We need to use the square bracket [ ], In the square bracket, we need to specify the key or index. * While using table expression, If the table entry does not exist, system throws the exception CX_SY_ITAB_LINE_NOT_FOUND. * Use line_exists statement to check the existence of a record. Report REPORT zab_rp_read_new . TABLES : vbak . SELECT-OPTIONS : s_vbeln FOR vbak - vbeln . SELECT vbeln , erdat , erzet , ernam , auart FROM vbak INTO TABLE @DATA ( lt_vbak ) WHERE vbeln IN @s_vbeln . WRITE : 'Index value' COLOR 5 . READ T...
* Customer exit for ME51N is - MEREQ001 * To implement the customer exit in CMOD. Step 1: Goto T-code: CMOD. Step 2: Give project name and click on create. Step 3: Give short text and click on Enhancement assignments . Press enter and click on save. Step 4: Click on components . Double click on CI_EBANDB include and create the include. Step5: Give your field names (If your enhancement category can't be enhanced) as per our requirement. Otherwise click on append structure and create. Field names must started with ZZ. Step 6: Save and activate the structure. Step 7: Double click on C_EBANDBX and create structure like this. Step 7: Double click on screen ...
Comments
Post a Comment