Displaying text field(s) & Calling Adobe Form Programatically


 This post describes  how to design some text fields in smart form and passing the text field value from a driver program.

Go to Tx- SFP.

A form interface is required to pass the data to the form. So select the Interface and provide a name and Click on Create button.

1

Continue.

2

Create an importing parameter.

3

Here added SPFLI structure as an importing parameter . Activate the Interface.

4

Go to Tx- SFP. Select the FORM option and provide a Form name and select the Create button.

5

Provide the above created Interface  name and Save.

6

Now we have to map the Interface importing parameter to the Form context node. So Drag the importing parameter and Drop on the context node.

7

Parameters are mapped form interface to form. Now to design the Form go to Layout tab.

8

We have to design the text fields. So drag&drop the text field form the  object library to the design view.

9

Select the text field in the design view & from the Object section , select the Binding option.

10

Map the field to the importing structure field – MANDT. 

11

Press ok.

12

Drag & Drop another text field.

13

From object ->Binding -> bind to the Carrid field.

14

Follow the process for some more text field design & binding.

15

16

All text fields can be put under a rectangular box. So drag & drop a rectangular box.

17

Now activate the form & test.

18

Click on the importing parameter.

19

This screen appears.

20

Below records exists in SPFLI table.

21

Fill some values in the importing parameter and Go back.

22

Execute.

23

Select preview button.

24

Here the form preview.

25


 

Let’s call  the Adobe Form  form ABAP program.  

Now check the generated Function module for the adobe form.

Click on test button .

26.png

here we have the generated FM name.

23

DATA cp_outparam TYPE sfpoutputparams,
              ip_funcname TYPE funcname,
              ls_spfli    TYPE spfli.

SELECT SINGLE FROM spfli INTO ls_spfli.

CALL FUNCTION ‘FP_JOB_OPEN’
  CHANGING
    ie_outputparams cp_outparam.

CALL FUNCTION ‘FP_FUNCTION_MODULE_NAME’
  EXPORTING
    i_name     ‘ZTEST_FORM_02’
  IMPORTING
    e_funcname ip_funcname.

CALL FUNCTION ip_funcname                ” ‘/1BCDWB/SM00000036’
  EXPORTING
*   /1BCDWB/DOCPARAMS        =
    is_spfli       ls_spfli
* IMPORTING
*   /1BCDWB/FORMOUTPUT       =
  EXCEPTIONS
    usage_error    1
    system_error   2
    internal_error 3
    OTHERS         4.

CALL FUNCTION ‘FP_JOB_CLOSE’
* IMPORTING
*   E_RESULT             =
  EXCEPTIONS
    usage_error    1
    system_error   2
    internal_error 3
    OTHERS         4.

 

 


 28

Execute the program.

29

Form preview as below.

30


 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s