sap abap code to read global variables values inside badi ADDR_TXJCD_CHECK using field symbols

        In real time scenario, some time we need to fetch the values from program variables, internal tables ect. inside badi or user exists or any other part of program. 

        In this example the scenario is I am doing a BADI implementation for BADI ADDR_TXJCD_CHECK, but here in this badi i want to fetch the value of idoc partner which is in main program SAPMV45A and the values which I want to read is IDOC_EDIDC-RCVPRN, but this is not present in the signature of the BADI.

   So using field symbol we can read the values from current session of the global program inside badi/user.

abap code to read the values using field symbol


  FIELD-SYMBOLS<fs_rcvprn> TYPE any.

  ASSIGN (lv_RCVPRNTO <fs_rcvprn>.

  if <fs_rcvprn> is ASSIGNED and <fs_rcvprn> 'XDEV700' and sy-tcode 'VA01'.


Post a Comment


Total Pageviews