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

Print Program and Form

Former Member
0 Likes
306

Dear all,

How can i forward the user input from a dialog program to SAPScript form?? What kind of function module should i use??

Regards,

Kit

2 REPLIES 2
Read only

Former Member
0 Likes
285

Hi,

Check this code.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = 'ZMM_PO3'

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = W_FMNAME

  • EXCEPTIONS

  • NO_FORM = 1

  • NO_FUNCTION_MODULE = 2

  • OTHERS = 3

.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION W_FMNAME

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

CONTROL_PARAMETERS = CPARAM

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

OUTPUT_OPTIONS = OUTOP

USER_SETTINGS = SPACE

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

TABLES

ITABFINAL = IT_FINAL

ITABCOND = IT_MAIN

  • EXCEPTIONS

  • FORMATTING_ERROR = 1

  • INTERNAL_ERROR = 2

  • SEND_ERROR = 3

  • USER_CANCELED = 4

  • OTHERS = 5

.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

IT_FINAL

IT_MAIN

These r the internal table in the driver program which contain data r passed to

Fm.

Assign points if useful.

Read only

Former Member
0 Likes
285

Hi,

In SAP script right click the window --> edit text --> go to line editor and write code like,

&name&.

Then create a zprogram and use three FM's Sequentially,

open_form ---> give toue Sap script form name.

write_form -


> give your corresponding window name.

close_form -


> just close the form.

Here only you should declare your field like,

data : name(3).

name = 'ABCDEF'.

THEN THE DATA IS PASSED FROM PROGRAM TO YOUR FORM.

Thanks,

Reward If Helpful.