Friday 1 August 2014

Use of FIELD-SYMBOLS when there is no option to set/change value in EXIT

Let’s say you have a requirement to update the KNA1-AUFSD (Order Block) whenever any customer created.

You have customer exit (function) EXIT_SAPMF02D_001.
But here we have KNA1 in the IMPORTING parameter only not in TABLES or CHANGING.



So in this case we can use field-symbols like below:

FIELD-SYMBOLS<AUFSD> TYPE ANY.

DATAKNA1_AUFSD(20VALUE '(SAPMF02D)KNA1-AUFSD'.

* Write your condition here.

IF SY-TCODE+2(2) = '01'.
  ASSIGN (KNA1_AUFSDTO <AUFSD>.
  <AUFSD> '01'.
ENDIF.

1 comment:

  1. Thanks for sharing this Information, Got to learn new things from your Blog on SAP SF.SAP SF

    ReplyDelete