Skip to Content
0
Former Member
Apr 30, 2009 at 05:06 AM

ABAP4_CALL_TRANSACTION for VA01

161 Views

Hi ,

I am Using VA01 to create a Credit Memo Request and when I am saving the Credit memo request then I am using an Exit USEREXIT_SAVE_DOCUMENT to generate a debit memo request which should have all the values same as the previous screen in credit memeo request . I am using the below FM to again call VA01 Tcode in the exit .

The values are being updated in the Internal table itab_spagpa but they are not coming in the VA01 Screen. Am I missing some thing ?

FORM userexit_save_document.

  • Order Type

wa_spagpa_tab-parid = 'AAT'.

wa_spagpa_tab-parval = 'DR'.

APPEND wa_spagpa_tab TO itab_spagpa.

  • Sold To party

wa_spagpa_tab-parid = 'VF'.

wa_spagpa_tab-parval = vbak-xblnr.

APPEND wa_spagpa_tab TO itab_spagpa.

wa_spagpa_tab-parid = 'VAG'.

wa_spagpa_tab-parval = vbak-kunnr.

APPEND wa_spagpa_tab TO itab_spagpa.

CALL FUNCTION 'ABAP4_CALL_TRANSACTION'

EXPORTING

TCODE = 'VA01'

SKIP_SCREEN = 'X'

TABLES

SPAGPA_TAB = itab_spagpa.

.

ENDIF.

ENDFORM. "USEREXIT_SAVE_DOCUMENT