cancel
Showing results for 
Search instead for 
Did you mean: 

Values in Form

Former Member
0 Kudos

Hi All,

I'm using table header values to print it in the form and im doing it like

&VBAK-VBELN&. How can I populate the value with vbak-vbeln - 1 in the same place instead of changing the driver program.

Can somebody help me with this please.

Thanks,

Kiran.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi kiran,

wat is the actual scenario u r using this becoz without changing print program if u want to include directly in actual programu need to have access key.else u can copy the program to a Z program and startmodifying it.

Former Member
0 Kudos

The driver program is the one which is copied from a standard SAp program and it is looping in it a standard FM and i couldnt change the driver program. Instaed I can change it in the Form when it prints it. I have got the access rights to change the script . Can yiou tell me how to chnage the value while printing please.

Thanks,

Kishore

Former Member
0 Kudos

Kiran,

as u said the field value is VBAK-VBELN this is nothing but sales oder header data.so, for this u have invoice smartform, to pass values into this we have to pass tables as work area and use them in the smartform layout .no need to change the print program but if the form layout is changed then change field values accordingly.

regards,

Durgaprasad

Former Member
0 Kudos

Hi Durga,

Sorry its not vbak-vbeln that I need to change. Its all done and I am passing all the values in the table and getting the output correct. In one of them its houls print the line item numbers like 001/002 of 6 where there are 6 line items and the page can only print 2 of them then it should say 001/002 of 006. But when the form is printed its just picking up the last line item of that page. Thats how the sap standard program has been written. So its like I have to substract that 002 by 1 and populate it n the form. Did you get me??? Please let me know how i can do that.

Thanks,

Kiran

Former Member
0 Kudos

kiran ,

i could partially understand the problem .i think u have something to do with the loop count.else go through the logic for 002 of 0006 and subtract the value by 1 as u said.logical not great but will solve the problem as per the requirement.

Former Member
0 Kudos

Hi Durga,

Can you tell me is there any chance that we can do any mathematical calcualtions like substraction in sapscript forms. I cant change the driver program like you have said...

Thanks,

Kiran.

Former Member
0 Kudos

sorry kiran,

i didn't do any calculations...inacse if i find il get back to u.

Former Member
0 Kudos

hi kiran,

try doing it by using PERFORM in scripts...

ex: u can give as

/: PERFORM <form> IN PROGRAM ztest

/: USING &VAR1&

/: USING &VAR2&

......

/: CHANGING &VAR1_OUT&

/: CHANGING &VAR2_OUT&

......

/: ENDPERFORM

in ztest..

FORM MY_FORM tables in_tab structure itcsy

out_tab structure itcsy.

data: varn like ....

read table in_tab with key name = 'VARN'.

if sy-subrc = 0.

move in_tab-value to varn.

endif.

read table out_tab with key name = 'VAR_OUTN'.

if sy-subrc = 0.

move <value> to ot_tab-value.

modify out_tab index sy-tabix.

endif.

ENDFORM.

hope this helps,

do reward if it helps,

priya.

Former Member
0 Kudos

thanks a lot priya.

I was looking it as a last option ....

Answers (0)