Skip to Content

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

Table accessing problem

Hi,

I am doing some modifications in Function Module: ZSHP_VEPVG_SELECT_01 (copy standard).

What I need is to make a simple check to the item category from table VBAP from each document stored in 'CX_SD_ORDER-VEPVG' (VBELN).

I can't do a simple loop to table CX_SD_ORDER because i got the error saying that this CX_SD_ORDER is neither specified under TABLES nor defines as an internal table.

I am doing a loop by this way:

LOOP AT CX_SD_ORDER-VEPVG TRANSPORTING NO FIELDS

WHERE VBELN NE space.

  • w_vbeln = VBELN.

ENDLOOP.

Now what i need is to go to table VBAP and check item category from each document. But the problem is how can i access to VBELN stored in that structure CX_SD_ORDER?

I would appreciate any help.

Thanks

Best regards

Tags:
Former Member
replied

CX_SD_ORDER-VEPVG is an internal table so you could loop over it.

data: l_wa_vepvg like line of CX_SD_ORDER-VEPVG.

LOOP AT CX_SD_ORDER-VEPVG into l_wa_vepvg.

"now you can access l_wa_vepvg-VBELN

ENDLOOP.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question