Demo code for Idoc (EDI) user exits, where you don’t get item number in all segments. This shows how to fetch item number from Parent segment (E1EDP01 in this case).
E1EDPA1 (Partner function segment in ORDERS idoc) does NOT have item number in it, So fetch from parent E1EDP01 (Item details) segment. To do that, write LOOP with segnam = E1EDP01 or E1EDPA1 – demo code is shown below.
LOOP AT int_edidd ASSIGNING <fs_edidd> WHERE segnam = 'E1EDP01' OR segnam = 'E1EDPA1'.
Some times, though you changed user authorizations, they will not be immediately effective (You get error in SU53 saying ‘Available in the master data, but not in the user buffer’).
To fix this, you need to reset user buffer. This can be done in 2 ways.
1) SU56 : transaction SU56, and changing to the user that was having the issue and from the menu Authorization Values > "Reset User Buffer".
2) PFUD : Run for all roles, to regenerate all profiles