use a hidden field and read the value from this hidden field.
How to create table?
Create subform by dragging internal table from the data layout tab
In binding, choose "use name <subform>"
The table is automatically created and displayed
How to create table with alternative?
Create 2 tables and alternatively hide the table using script by a condition.
How to call adobe form from driver program?
The 5 basic steps involved are -
1.Data retrieval in the report programme.
2.Call Function 'FP_FUNCTION _MODULE_NAME( to get the generated
function module name).
3.Call Function 'FP_JOB_OPEN '.
4.Call Function <generated function module name>.
5.Call Function 'FP_JOB_CLOSE'.
2.Call Function 'FP_FUNCTION _MODULE_NAME( to get the generated
function module name).
3.Call Function 'FP_JOB_OPEN '.
4.Call Function <generated function module name>.
5.Call Function 'FP_JOB_CLOSE'.
Example:
DATA: CUSTOMER TYPE SCUSTOM,
BOOKINGS TYPE TY_BOOKINGS,
CONNECTIONS TYPE TY_CONNECTIONS,
FM_NAME TYPE RS38L_FNAM,
FP_DOCPARAMS TYPE SFPDOCPARAMS,
FP_OUTPUTPARAMS TYPE SFPOUTPUTPARAMS.
* GETTING THE DATA
<data selection>
* PRINT:
* 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.
* Get the name of the generated function module
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
I_NAME = '<form name>'
IMPORTING
E_FUNCNAME = FM_NAME.
IF SY-SUBRC <> 0.
<error handling>
ENDIF.
* Call the generated function module
CALL FUNCTION FM_NAME
EXPORTING
/1BCDWB/DOCPARAMS = FP_DOCPARAMS
CUSTOMER = CUSTOMER
BOOKINGS = BOOKINGS
CONNECTIONS = CONNECTIONS
* IMPORTING
* /1BCDWB/FORMOUTPUT =
EXCEPTIONS
USAGE_ERROR = 1
SYSTEM_ERROR = 2
INTERNAL_ERROR = 3.
IF SY-SUBRC <> 0.
<error handling>
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.
BOOKINGS TYPE TY_BOOKINGS,
CONNECTIONS TYPE TY_CONNECTIONS,
FM_NAME TYPE RS38L_FNAM,
FP_DOCPARAMS TYPE SFPDOCPARAMS,
FP_OUTPUTPARAMS TYPE SFPOUTPUTPARAMS.
* GETTING THE DATA
<data selection>
* PRINT:
* 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.
* Get the name of the generated function module
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
I_NAME = '<form name>'
IMPORTING
E_FUNCNAME = FM_NAME.
IF SY-SUBRC <> 0.
<error handling>
ENDIF.
* Call the generated function module
CALL FUNCTION FM_NAME
EXPORTING
/1BCDWB/DOCPARAMS = FP_DOCPARAMS
CUSTOMER = CUSTOMER
BOOKINGS = BOOKINGS
CONNECTIONS = CONNECTIONS
* IMPORTING
* /1BCDWB/FORMOUTPUT =
EXCEPTIONS
USAGE_ERROR = 1
SYSTEM_ERROR = 2
INTERNAL_ERROR = 3.
IF SY-SUBRC <> 0.
<error handling>
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.
No comments:
Post a Comment