Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How we can send data to a line type of field in a deep structure?

Hi ,

      I got an object in the in badi extension  .In that I have to retrieve the serial id from objk table and assign that serial id to the line type SAPPLSEF_SERIAL_ID  of table type SAPPLSEF_SERIAL_ID_TT in the field  SERIAL_ID  of  the structure SAPPLSEF_DLV_ITEM_INF and this structure is a line type of a SAPPLSEF_DLV_ITEM_INF of table type SAPPLSEF_DELIVERY_ITEM_INF_TAB for the filed ITEM in the structure SAPPLSEF_DLV_INF

Thanks ,

Venkat.

Former Member
Former Member replied

Just create a internal table of the same table type assigned to the field, you can do it as deep as you need. It would be something like this:

DATA:
ls_structure TYPE SAPPLSEF_DLV_INF,

lt_item TYPE SAPPLSEF_DELIVERY_ITEM_INF_TAB,

lt_obj TYPE SAPPLSEF_SERIAL_ID_TT.

<FIELD-SYMBOLS>:

<s_item> TYPE SAPPLSEF_DLV_ITEM_INF,

<s_obj> TYPE SAPPLSEF_SERIAL_ID.

lt_item = ls_structure-item.

LOOP AT lt_item ASSIGNING <s_item>.

lt_obj = <s_item>-SERIAL_ID.

LOOP AT lt_obj ASSIGNING <s_obj>.

<s_obj>-xxx = 'XXXX'.

ENDLOOP.

ENDLOOP.



@Eitan was faster, when I wrote I didn't see his reply.

Message was edited by: Felipe Simionatto

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question