Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

automatically increments serialno in smartforms?

Former Member
0 Likes
1,168

Hello Experts,

I developed one format using smartform, In this one field is there (that is serial no),

My requirement is when ever execute the report serino is automatically incrementted by1.

how it is possible in smartforms? pls help me in this.(increments only when they take print).

5 REPLIES 5
Read only

Former Member
0 Likes
874

Hi

Use the Variant in table TVARVC. In that create one Variant and update the variant value when ever you take the print.

and use that variant value in u r form.

Regards,

Raghu.

Read only

0 Likes
874

Hi Raghavendor,

Thank u for giving this information ,

Please give me in detail so that i can understood.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
874

You can create a number range (transaction SNRO) and then call FM NUMBER_GET_NEXT to get the serial number. (Ref: [Number ranges|http://help.sap.com/saphelp_sm32/helpdata/en/2a/fa02e3493111d182b70000e829fbfe/frameset.htm])

Regards,

Raymond

Read only

Former Member
0 Likes
874

hii,

when u loop into final table just give the code below.And place the variable in the table coloumn.

loop at it_vbrp into wa_vbrp.

v_slno = v_slno + 1.

wa_final1-slno = v_slno.

regards,Sri

Read only

deepak_dhamat
Active Contributor
0 Likes
874

Hi ,

For Serial no in Smartforms .

You have to create one Custom ztable . When ever they take print update that table with max number + 1

and access that no before updating . In this way you will be maintaining print records also add year inthat table

regards

Deepak