Tuesday
Hi all,
I'm struggling a bit with abap as I'm not an abaper, just trying to do something simple.
As the title states, I want to load 0WBS_ELEMT_ATTR (Fields: 0CO_OBJNR and 0WBS_ELEMT) into an internal table in start routine and use that to lookup.
In the start routine I've declared the table.
TYPES: BEGIN OF ty_wbs,
co_objnr TYPE /BI0/OICO_OBJNR,
wbs_elemt TYPE /BI0/OIWBS_ELEMT,
END OF ty_wbs.
Trying to load the table is where I'm running into trouble
SELECT co_objnr
wbs_elemt
INTO TABLE it_wbs
FROM /BI0/PWBS_ELEMT
FOR ALL ENTRIES IN SOURCE_PACKAGE
This needs a where clause and I'm not sure how to write it.
the 0CO_OBJNR in 0WBS_ELEMT_ATTR is type CHAR and Length 22.
the routine I'm writing it in where I want to match PS_PSP_PNR is type NUMC and Length 08.
How can I write something like this without it erroring saying co_objnr and ps_psp_pnr are different type and length.
WHERE co_objnr = SOURCE_PACKAGE-PS_PSP_PNR
Thanks
The internal format for WBS element is 8 numeric characters, and external format is 24 alphanumeric characters. This is usually handled by a conversion-exit.
You could fill the internal table used in FOR ALL ENTRIES with only co_objnr+2(8)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
10 | |
10 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.