01-12-2005 10:40 AM
Hi all,
we have following problem.
We want to post a logistic invoice (TA MIRO). During the transaction we want to have access to the condition records during the BTE 00001050 (After FI POST_DOCUMENT).
We don't have the information in the parameters.
How it is possible to access the conditions???
Kind regards
André
01-12-2005 11:52 AM
You can use something like this,
DATA: w_fieldname(30) TYPE c,
w_matnr LIKE mara-matnr.
FIELD-SYMBOLS <fs_xdmaex> TYPE STANDARD TABLE.
w_fieldname = '(SAPLMGMW)xdmaex[]'.
ASSIGN (w_fieldname) TO <fs_xdmaex>.
In this case I am reading an internal table which not part of the standard interface, but is avaliable in on loaded program 'SAPLMGMW'.
Regards
01-12-2005 11:52 AM
You can use something like this,
DATA: w_fieldname(30) TYPE c,
w_matnr LIKE mara-matnr.
FIELD-SYMBOLS <fs_xdmaex> TYPE STANDARD TABLE.
w_fieldname = '(SAPLMGMW)xdmaex[]'.
ASSIGN (w_fieldname) TO <fs_xdmaex>.
In this case I am reading an internal table which not part of the standard interface, but is avaliable in on loaded program 'SAPLMGMW'.
Regards
01-12-2005 12:30 PM
It seems, that this is not working, because the function module for the BTE belongs to another function group.
So I can not assign (PROGRAM)FIELD to a field symbol.
Kind regards
André
01-12-2005 12:47 PM
<i>It seems, that this is not working, because the function module for the BTE belongs to another function group.
So I can not assign (PROGRAM)FIELD to a field symbol.</i>
With this way you can assign it even if it's in a different Function group, program, whatever if it's in the memory!!!
Debug this example to understand how this approach works.
In this case you can get a value from program SAPLSFES, which has no relation with program ztest_external at all.
However with this approach it works.
Peter
PS: If it helps, don't forget about the reward points:-)
REPORT ztest_external .
DATA: fake_external_var(20) TYPE c VALUE 'I am external'.
DATA: fieldname1(100) TYPE c.
DATA: fieldname2(100) TYPE c.
MOVE '(ZTEST_EXTERNAL)fake_external_var' TO fieldname1.
MOVE '(SAPLSFES)C_DPTABLESIZE' TO fieldname2.
FIELD-SYMBOLS: <fs1> TYPE ANY.
FIELD-SYMBOLS: <fs2> TYPE ANY.
START-OF-SELECTION.
ASSIGN (fieldname1) TO <fs1>.
ASSIGN (fieldname2) TO <fs2>.
WRITE: / <fs1>.
WRITE: / <fs2>.
01-12-2005 1:38 PM
It works, problem was, that I wanted to see a local field.
Thanks
André