‎2009 Dec 21 5:10 PM
Hi all,
When I create a document, I'm trying to fill the FDLEV field with BAPI_ACC_DOCUMENT_POST.
For what I saw on other messages, I need to use extension1 table, but it doesn't seem to work.
Anyone can help me?
...
ls_extension-field1 = ps_receivable-itemno_acc.
ls_extension-field2 = 'FDLEV'.
ls_extension-field3 = ps_bseg-fdlev.
APPEND ls_extension TO pt_extension.
...
Thanks in advanced,
Luis Cruz
‎2009 Dec 21 5:21 PM
Hi
Because u need to implement the BTE RWBAPI01 in order to get the fields transfered by extension:
a) Step one: fill the extensionin:
DATA: ST_EXTENSIONIN,
itemno_acc type POSNR_ACC
FDLEV type BSEG-FDLEV,
ST_EXTENSIONIN.
ST_EXTENSIONIN-ITEMNO_ACC = ps_receivable-itemno_acc.
ST_EXTENSIONIN-FDLEV = ps_bseg-fdlev.
APPEND ST_EXTENSIONIN TO pt_extension.B) Step two: get the value from extension (in BTE):
DATA: ST_EXTENSIONIN,
itemno_acc type POSNR_ACC
FDLEV type BSEG-FDLEV,
ST_EXTENSIONIN.
LOOP AT t_extension.
MOVE t_extension to ST_EXTENSIONIN.
READ TABLE IT_ACCIT WITH KEY POSNR = ST_EXTENSIONIN-ITEMNO_ACC.
IF SY-SUBRC = 0.
IT_ACCIT-FDLEV = ST_EXTENSIONIN-FDLEV.
MODIFY T_ACCIT INDEX SY-TABIX.
ENDIF.
ENDLOOP.As a structure ST_EXTENSIONIN (to fill the extensionin table) has to be used in two different program, it should be better to define it in dictionary instead of the program.
Max
‎2009 Dec 21 5:21 PM
Hi
Because u need to implement the BTE RWBAPI01 in order to get the fields transfered by extension:
a) Step one: fill the extensionin:
DATA: ST_EXTENSIONIN,
itemno_acc type POSNR_ACC
FDLEV type BSEG-FDLEV,
ST_EXTENSIONIN.
ST_EXTENSIONIN-ITEMNO_ACC = ps_receivable-itemno_acc.
ST_EXTENSIONIN-FDLEV = ps_bseg-fdlev.
APPEND ST_EXTENSIONIN TO pt_extension.B) Step two: get the value from extension (in BTE):
DATA: ST_EXTENSIONIN,
itemno_acc type POSNR_ACC
FDLEV type BSEG-FDLEV,
ST_EXTENSIONIN.
LOOP AT t_extension.
MOVE t_extension to ST_EXTENSIONIN.
READ TABLE IT_ACCIT WITH KEY POSNR = ST_EXTENSIONIN-ITEMNO_ACC.
IF SY-SUBRC = 0.
IT_ACCIT-FDLEV = ST_EXTENSIONIN-FDLEV.
MODIFY T_ACCIT INDEX SY-TABIX.
ENDIF.
ENDLOOP.As a structure ST_EXTENSIONIN (to fill the extensionin table) has to be used in two different program, it should be better to define it in dictionary instead of the program.
Max