cancel
Showing results for 
Search instead for 
Did you mean: 

Can we write program logic in script like in smartform

Former Member
0 Kudos
142

How to add some logic to retrieve the extra fields o display in script without modifying the driver program

and i want to know what is the exact difference between script and smartform

Thanks&Regards

Pradeep Reddy M

Accepted Solutions (1)

Accepted Solutions (1)

former_member196280
Active Contributor
0 Kudos

Goto the window where you want to retrieve extra fields for displaying on scripts.

/: PERFORM GET_VALUES IN PROGRAM FI_INCLUDE

/:USING &<field name>& <b> "Existing field in SAPscript</b>

/:CHANGING &<field name1& <b> "This is the extra field</b>

/:ENDPERFORM

Then create subroutine pool program(include, ex, inculde name ,FI_INCLUDE) and you have to write the code.

FORM GET_VALUES tables int_cond structure itcsy

outt_cond structure itcsy.

data : value(20), value1(20). "do your own declarations

Read int_cond table index 1.

value = int_cond-value.

value1 = value1 + value.

Read outt_cond table index 1.

outt_cond-value = value1.

Modify outt_cond index 1.

ENDFORM.

Regards,

Sairam

Answers (1)

Answers (1)

former_member196280
Active Contributor
0 Kudos

You can call subroutine from SAPscript and display the values in the forms without modifying the driver prograzm, it looks similar to program logic.

Regards,

Sairam

Former Member
0 Kudos

hi sairam

can u tell me exactly where & how to write the logic

Thank you