2007 Oct 31 2:43 PM
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
2007 Oct 31 2:58 PM
In that case you can get the value out of field CX_SD_ORDER-VEPVG directly because it is only a structure not a table. Make sure that the vbeln is passed into the function module correctly (in field VEPVG)
Regards,
Michael
Please check,
Global data copied or not.
any standard includes are necessary for this FM?
Thanks nad Regards,
2007 Oct 31 2:46 PM
If this is a structure, there will always only be one entry, just access the field directly (CX_SD_ORDER-VEPVG). If you can have more than one entry in that table, what is the exact declaration of CX_SD_ORDER?
Thanks,
Michael
2007 Oct 31 2:49 PM
In the Function Module SHP_VEPVG_SELECT_01 I have this structure defined by:
VALUE(CX_SD_ORDER) TYPE SHP_VL10_SD_ORDER, and i need to access to field VBELN from this structure..
Thanks
Best regards
2007 Oct 31 2:49 PM
Please check,
Global data copied or not.
any standard includes are necessary for this FM?
Thanks nad Regards,
2007 Oct 31 2:58 PM
In that case you can get the value out of field CX_SD_ORDER-VEPVG directly because it is only a structure not a table. Make sure that the vbeln is passed into the function module correctly (in field VEPVG)
Regards,
Michael
2007 Oct 31 4:32 PM
Hi,
I have the field in CX_SD_ORDER-VEPVG[1]-VBELN... But i can't access in my program by writing that.
Thanks
Message was edited by:
thor thor
2007 Oct 31 5:33 PM
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.
2007 Oct 31 5:35 PM
Hi Che Eky!
Thanks a lot!!
You resolve my problem.
Thanks and best regards
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |