Skip to main content

Posts

Showing posts with the label SAP ABAP

Adding Page Break in Smartforms

Go to Create > Program Line > Command Check the go to new page in the general attributes tab

Adding New Button in ALV Grid (Example: Refresh Button)

 Steps to add a refresh button in ALV grid display. 1. Copying status "STANDARD" from program "SAPLKKBL". Go to transaction code SE41 and follow the screenshot to copy the status. 2. Assign refresh button in the status. Go to SE41. Put the custom program and status name we have just copied. Click on the "Change" button. Add the refresh button with function code and icon. 3. Set PF STATUS in the program just before the "REUSE_ALV_GRID_DISPLAY" function module. 4. Enable  i_callback_user_command and  i_callback_pf_status_set  in the "REUSE_ALV_GRID_DISPLAY" function module 5. Write the subroutine for get data which will populate the internal table after click on refresh button. 6. Write the subroutine for "USER_COMMAND_LOG". FORM  user_command_log  USING  u_ucomm      TYPE  sy - ucomm                        ...

Delete User Variant

 Follow the below steps to delete a variant from the variant list Go to transaction code "SE38" Input the program name Now click on "Goto > Variants " Now select the variant name from the F4 help and click on delete to remove the variants from the list

Implement Search Help Exit

 Steps for implementing search help exit Create a functio n module copying " F4IF_SHLP_EXIT_EXAMPLE " Declare an internal table and work area which is same as search help structure Go to source code tab. Then go to   " IF  CALLCONTROL - STEP  =  'SELECT' ." section of the code Populate the internal table with required data Implement another function module " F4UT_PARAMETER_RESULTS_PUT" Sample Code: IF  CALLCONTROL - STEP  =  'SELECT' . SELECT  *  FROM  ZDISP_PENDING    INTO  CORRESPONDING  FIELDS  OF TABLE  @it . "Populating Internal Table      DATA  t_fields  LIKE  TABLE  OF  shlp_tab - fielddescr .      DATA  w_fields  LIKE  LINE  OF  shlp_tab - fielddescr .      LOOP  AT  shlp_tab .        LOOP  AT  shlp_tab - fielddescr  INTO ...

Object type "ZCL_IM_WORKORDER_GOODSMVT" does not exist Message No. OO003

 Solution steps: Execute report RS_WORKING_AREA_CONSISTENCE without any option marked: this will only display the existing inconsistencies in table DWINACTIV. If inconsistencies are found, return to the previous screen (F3). Mark the DELETE option. Execute report RS_WORKING_AREA_CONSISTENCE again. Once the execution is finished, try to run required transaction.

Customized F4 Help

Function Module:  F4IF_INT_TABLE_VALUE_REQUEST Create types: TYPES :  BEGIN  OF  ty_values ,          lot    TYPE  qplos ,          batch  TYPE  charg_d ,          material  TYPE  matnr ,           date  TYPE  datum ,         END  OF  ty_values . Declare internal table and work area. DATA :  it_values       TYPE  STANDARD  TABLE  OF  ty_values  WITH  KEY  lot ,       wa_values       TYPE  ty_values . DATA :  it_return  TYPE  STANDARD  TABLE  OF  ddshretval. Create the event to request the value AT  SELECTION-SCREEN  ON  ...