2007 Mar 21 3:40 PM
Hi,
My specification is like below.
<b> Read Table IHPA with key objnr = qm<notification number> parvw = yl.
Select parnr(userid)
Lookup user table using ihpa-parnr and read user name,telephone number,fax number& function.
Take plant number from the quality notification & read plant name and address and print here.</b>
hereas per my knowledge my code is
select parnr from ihpa into v_parnr where objnr = v_num and parvw = 'YL'.
select bname telnr telfx from usr03 INTO (v_bname,v_telnr,v_telfx) where bname = v_parnr.
is the above code is correct for the first 2 points.
in this i have one question i.e: v_num is coming from script it's holding value like 20000040.
but in ihpa table BNAME is like 'QM000002000040'
so h do we compare it?
and for last point
i.e take plant num from the quality notifiction & Read plant name and address and print?
may i know how can do this?i.e which table i need to use.
this is vendor lettor form.
im using the qm02 transaction.
im waitng for response.
Thanks,
Srinivas.
2007 Mar 21 3:50 PM
Hi!
- Try using ADRC table for address data, instead of the USR03 table. The key is always and address number (ADRNR, ADDRNUMBER, etc...).
- You can create the object number (BNAME) yourself from the document number:
F.e.: CONCATENATE 'QM00000' v_num INTO lv_bname.
- for plant you can read T001W table. You'll find the address number here (ADRNR). With this you can read ADRC table.
Regards
Tamá
2007 Mar 21 3:50 PM
Hi!
- Try using ADRC table for address data, instead of the USR03 table. The key is always and address number (ADRNR, ADDRNUMBER, etc...).
- You can create the object number (BNAME) yourself from the document number:
F.e.: CONCATENATE 'QM00000' v_num INTO lv_bname.
- for plant you can read T001W table. You'll find the address number here (ADRNR). With this you can read ADRC table.
Regards
Tamá
2007 Mar 21 3:57 PM
hi,
for ur first question,
u know the string length of bname field from the dbtable.
assume len = strlen( bname ) = 20.
u want only last 8 characters to compare.
pos = len - 8 =14.
pos = pos - 1.
so do,
select bname telnr telfx from usr03 INTO (v_bname,v_telnr,v_telfx)
where <b>bname+pos(8)</b> = v_parnr.
regards
2007 Mar 22 6:22 PM
Hi Ramas,
Thanks for ur reply.
here im using CONCATENATE 'QM00000' v_num INTO lv_bname
and fetching the username(parnr) and pass this to "BAPI_USER_GET_DETAIL"
and im fetching the address,full name,function.
i.e as per my spec.
and from too1w im fetching the stras,ort01,region,pstlz.
but here my question is im displaying stras ort01 region pstlz.so these r based on plant.
but user name and all not on plant condition.
bez there is no relation between t001w and ihpa.
my question is it need to maintain that record by client or we can do it na?
if so is there any solution?
Thanks to all for ur reply,
Thanks,
Srinivas