‎2007 Jul 12 4:27 AM
in the table NAST there is a field named OBJKY
I want to use it in the table LIPS. but in the table LIPS there are two key fields.
if I want to select one line in the table LIPS, I need to know the two fields.
But in the table NAST, the field OBJKY contains the two fields together.e.g
in the NAST , the data of the field OBJKY :0080000002000010
but in the LIPS , the VBELN is 0080000002, the POSNR is 000010
so how can I slip the OBJKY to two fields?
select single VBELN POSNR
from LIPS
where VBELN = NAST-OBJKY(10)
and POSNR = NAST-OBJKY(11)+6.
I don't know if it is correct. So I need all you help
Thanks in advance
Nick
‎2007 Jul 12 4:31 AM
data : v_vbeln like likp-vbeln,
v_posnr like likp-posnr.
v_vbeln = nast-objky+0(9).
v_posnr = nast-objky+10(6).
select single VBELN POSNR
from LIPS
where VBELN = v_vbeln
and POSNR = v_posnr.
Thanks
Seshu
‎2007 Jul 12 4:30 AM
Do it like this.
Decalre two variables... for example char1 and char2.
char1 = <b>NAST-OBJKY+0(10).</b>
char2 = <b>NAST-OBJKY+10(6).</b>
select single VBELN POSNR
from LIPS
where VBELN = <b>char1</b>
and POSNR = <b>char2.</b>
Reward points!!
Regards,
SaiRam
‎2007 Jul 12 4:31 AM
Hi Nick,
Check if it works,
select single VBELN POSNR
from LIPS
where VBELN = NAST-OBJKY+0(10)
and POSNR = NAST-OBJKY+10(6).
But the best option is create another Internal table with two fields VBELN and POSNR and move OBJKY to these fields and use that internal table to query LIPS.
Reward points if useful.
Regards,
Atish
‎2007 Jul 12 4:31 AM
data : v_vbeln like likp-vbeln,
v_posnr like likp-posnr.
v_vbeln = nast-objky+0(9).
v_posnr = nast-objky+10(6).
select single VBELN POSNR
from LIPS
where VBELN = v_vbeln
and POSNR = v_posnr.
Thanks
Seshu
‎2007 Jul 12 4:33 AM
data : v_vbeln(11),
v_posnr(7).
concatenate NAST-OBJKY(10) '%' into v_vbeln.
concatenate NAST-OBJKY+10(6) '%' into v_posnr.
select single VBELN POSNR
from LIPS
where VBELN like v_vbeln
and POSNR like v_posnr.
regards
shiba dutta
‎2007 Jul 12 4:33 AM
select single VBELN POSNR
from LIPS
where VBELN = NAST-OBJKY(10)
and POSNR = NAST-OBJKY+10(6).Regards
Gopi