03-25-2008 11:01 AM
hi ,
this is very urgent.
Select AWKEY from BKPF.
AWKEY is the concatenated form of BELNR and GJAHR.
Input this to RSEG in BELNR and GJAHR.
You will get EBELN and EBELP.
can any one suggest me any process, how to split that awkey key for chking belnr and gjahr.
thanks
Santosini
03-25-2008 11:48 AM
Hi,
Use the code as follows.
Select AWKEY from BKPF.
select ebeln ebelp from rseg where belnr = awkey+0(9)
and gjahr = awkey+10(4).
Regards,
Sanakr.
03-25-2008 11:08 AM
Hi,
In my system i could see the AWKEY is combination of BELNR + BUKRS + GJAHR. It has 20 char length but in table field it has 18 characters filled.
Please refer below code:
belnr = object(10)
BUKRS = object+10(4)
GJAHR = object+14(4).
Thanks,
Sriram Ponna.
03-25-2008 11:40 AM
select awkey
from bkpf
into gv_awkey
where < conditions >.
if not gv_awkey is initial.
Gv_belnr = gv_awkey(10).
Gv_gjahr = gv_awkey+14(4).
Endif.
If not gv_belnr is initial and not gv_gjahr is initial.
Select ebeln
Ebelp
From rseg
Into < data variables >
Where belnr = gv_belnr
And gjahr = gv_gjahr.
Endif.
If helpfull reward points.
Thanks
Sumanth
03-25-2008 11:48 AM
Hi,
Use the code as follows.
Select AWKEY from BKPF.
select ebeln ebelp from rseg where belnr = awkey+0(9)
and gjahr = awkey+10(4).
Regards,
Sanakr.
03-25-2008 11:48 AM
Another option
data:
begin of wk_area,
belnr(10) type c,
burks(4) type c,
gjhar(4) type c,
end of wk_area.
start-of-selection.
select single AWKEY.....
work-area = bkpf-awkey.
* you now can access
wk_area-belnr
wk_area-burks
wk_area-gjhar