Calling the FB03 ANF VF03 T-CODE

with the help the below code we can call the fb03 and vf03 t-code for display purpose and pass in user commond field and display 




* Check function code
  CASE r_ucomm.
    WHEN '&IC1'.

*   Check field clicked on within ALVgrid report
      IF rs_selfield-fieldname 'VBELN'.

*     Read data table, using index of row user clicked on
        READ TABLE i_tab INTO wa_tab INDEX rs_selfield-tabindex.
*     Set parameter ID for transaction screen field
        SET PARAMETER ID 'VF' FIELD wa_tab-vbeln.
*     Execute transaction FB03, and skip initial data entry screen
        CALL TRANSACTION 'VF03' AND SKIP FIRST SCREEN.

*   Check field clicked on within ALVgrid report
      ELSEIF rs_selfield-fieldname 'BELNR'.

*     Read data table, using index of row user clicked on
        READ TABLE i_tab INTO wa_tab INDEX rs_selfield-tabindex.
*     Set parameter ID for transaction screen field
        SET PARAMETER ID 'BLN' FIELD wa_tab-belnr.
        SET PARAMETER ID 'BUK' FIELD wa_tab-bukrs.
        SET PARAMETER ID 'GJR' FIELD wa_tab-gjahr.

*     Execute transaction FB03, and skip initial data entry screen
        CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.

      ENDIF.

Comments

Popular posts from this blog

all user exit mv45afzz (implicit user exit )

How to Give Dropdown in alv report in sap abap programming Language

Long Text in input and output field in module pool