01-31-2008 7:54 AM
Hi Friends,
I want to generate one internal number and print the same for my Gate Pass Form...this number should be alloted to the particular delivery document which i called for and it goes like other delivery document number for follow-ups.
If i call the same delivery number for multiple print out...the gates pass no should be same as generated once.
Example in FORM****
Gatepass No:1
Invoice No: 98300012
then in next FORM
Gatepass No: 2
Invoice No: 98301247
Pls advise with some sample code of FM.
thanks & regards
sankar.
Edited by: sankar babu on Jan 31, 2008 9:13 AM
Edited by: sankar babu on Jan 31, 2008 12:26 PM
01-31-2008 11:32 AM
01-31-2008 11:34 AM
Step 1)
Create a Number Range in SNRO Transaction.
Step 2)
Create a Z Table with two fields Delivery Number and Gate Pass Number.
Step 3)
In your form, write the code as per the following guidelines.
select single * from ZTABLE where DELIVERY = P_DELIVERY.
if sy-subrc <> 0.
Use the FM NUMBER_GET_NEXT to get the next available
number.
ztable-delivery = p_delivery.
ztable-gatepassno = <Number that was returned by the FM>.
modify ztable from ztable.
endif.
Regards,
Ravi Kanth Talagana
01-31-2008 11:58 AM
HI Ravikanth,
thanks for ur prompt reply.
I've created a new object range and assigned the same as u said.But actually, before assinging a new one, one of my colleague already moved the gatepassno to one table with same FM.So, even if i assigned a new one, the old GP number is still repeating in the Form, So how to clear the table or this Gatepass number and run with a new object range.
Pls advise.
regards
sankar.