cancel
Showing results for 
Search instead for 
Did you mean: 

adobe...subform data, does not pull when called via abap program

former_member317781
Active Participant
0 Kudos

hi Masters,

i have created adobe form, and i created a body with the subform with 4 fileds type table.

when i execute it drectly via SFP and give the logic in INITIALIZATION the data comes up.am happy...

but i want to call via program ABAP via SE38...this is how my FM looks like, How can i pass my table via program

DATA: fm_name           TYPE rs38l_fnam,     

       fp_docparams       TYPE sfpdocparams,  

       fp_outputparams   TYPE sfpoutputparams,

       pt_vbap                  type TABLE OF vbap,       "

       DATE TYPE SY-DATUM.


* Sets the output parameters and opens the spool job

CALL FUNCTION 'FP_JOB_OPEN'                 

   CHANGING

     ie_outputparams = fp_outputparams

   EXCEPTIONS

     cancel          = 1

     usage_error     = 2

     system_error    = 3

     internal_error  = 4

     OTHERS          = 5.

IF sy-subrc <> 0.

*            <error handling>

ENDIF.

select * from vbap into TABLE pt_vbap where vbeln = '0000000012'.

CALL FUNCTION '/1BCDWB/SM00000091'

* EXPORTING

*   /1BCDWB/DOCPARAMS        = fp_docparams

* IMPORTING

*   /1BCDWB/FORMOUTPUT       =

* EXCEPTIONS

*   USAGE_ERROR              = 1

*   SYSTEM_ERROR             = 2

*   INTERNAL_ERROR           = 3

*   OTHERS                   = 4

           .

IF SY-SUBRC <> 0.

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

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

ENDIF.

      

*&---- Close the spool job

CALL FUNCTION 'FP_JOB_CLOSE'

*    IMPORTING

*     E_RESULT             =

   EXCEPTIONS

     usage_error           = 1

     system_error          = 2

     internal_error        = 3

     OTHERS               = 4.

IF sy-subrc <> 0.

*            <error handling>

ENDIF.

in my interface i have declared like this...

in types :

types : types_vbap type TABLE OF vbap.

global data :

PT_VBAPTYPETYPES_VBAP

output :

pt_vbap

Code Initialization :

*select * from vbap into TABLE pt_vbap where vbeln = '0000000012'.

the output comes, no data on it....can i have some input pls..

thank you,

jacob.


Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You Did a Mistake in the Interface.

Declare Import Parameter say t_vbap  and pass your pt_vbap to it .

in your Interface you Declared pt_vbap as Global Parameter that's why it is working when you tested from SE37, but global parameters are not visible to SE38 Programs.

Steps:

Goto your Interface  and Create Import Parameter t_vbap type  vbap_t.

Activate.

Then Goto Context and Drag this Table  t_vbap from Interface(Left Hand side).

In the Layout Use this Table.

or

Another Way.

Goto Initialization and Just assign

pt_vbap =  t_vbap. (t_vbap is from Import Parameter from Interface).

Then Goto your Driver Program and call the function Module '/1BCDWB/SM00000091'

you will see some thing leke below.

CALL FUNCTION '/1BCDWB/SM00000091'

* EXPORTING

*   /1BCDWB/DOCPARAMS        = fp_docparams

   t_vbap                                        = pt_vbap  (pass your Internal Table here)

* IMPORTING

*   /1BCDWB/FORMOUTPUT       =

* EXCEPTIONS

*   USAGE_ERROR              = 1

*   SYSTEM_ERROR             = 2

*   INTERNAL_ERROR           = 3

*   OTHERS                   = 4

           .

IF SY-SUBRC <> 0.

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

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

ENDIF.

former_member317781
Active Participant
0 Kudos

Thank you.

Answers (0)