on 08-02-2007 4:07 PM
Hi All,
i am facing one problem.
I have written program like this:
TABLES : SCARR,SPFLI.
DATA : BEGIN OF ITAB_REL OCCURS 0,
CARRID LIKE SCARR-CARRID,
CARRNAME LIKE SCARR-CARRNAME,
CONNID LIKE SPFLI-CONNID,
CITYFROM LIKE SPFLI-CITYFROM,
CITYTO LIKE SPFLI-CITYTO,
END OF ITAB_REL.
SELECTION-SCREEN BEGIN OF BLOCK BOC1 WITH FRAME TITLE TEXT-001.
PARAMETERS CARRIER LIKE SCARR-CARRID.
SELECTION-SCREEN END OF BLOCK BOC1.
SELECT SINGLE CARRID CARRNAME
INTO (ITAB_REL-CARRID,ITAB_REL-CARRNAME)
FROM SCARR
WHERE CARRID = CARRIER.
SELECT *
FROM SPFLI
WHERE CARRID = ITAB_REL-CARRID.
ITAB_REL-CONNID = SPFLI-CONNID.
ITAB_REL-CITYFROM = SPFLI-CITYFROM.
ITAB_REL-CITYTO = SPFLI-CITYTO.
APPEND ITAB_REL.
ENDSELECT.
data : fm_name type rs38l_fnam.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'Z_SMARTFORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = fm_name
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 fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
Z_INT = ITAB_REL
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.
ENDIF.
now in smartforms in form interface in tables tab i have declared a Parameter
Z_INT but what will be the type for Z_INT ?
is it internal table that i have declared in program or some database table?
after that in the form the data will be printed through internal table Z_INT.
pls give the solution.
hi,
smartforms->form interface->parameter name z_int type as like associated type->itab_rel.
r else create the structure for tat use the structure name in associated type.
Regards,
Divya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
In abap dictionary se11 create structure with the following components
CARRID LIKE SCARR-CARRID,
CARRNAME LIKE SCARR-CARRNAME,
CONNID LIKE SPFLI-CONNID,
CITYFROM LIKE SPFLI-CITYFROM,
CITYTO LIKE SPFLI-CITYTO
Then use the same structure in driver program as well as in form interface in tables tab declared that Parameter Z_INT of type that structure .
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In order to use this structure in both your calling program and smartform you will need to define it in the data dictionary. Go into transaction SE11and create a data type structure with the fields;
CARRID LIKE SCARR-CARRID,
CARRNAME LIKE SCARR-CARRNAME,
CONNID LIKE SPFLI-CONNID,
CITYFROM LIKE SPFLI-CITYFROM,
CITYTO LIKE SPFLI-CITYTO
The use this type in your program and smartfrom.
Regards,
Nick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
It should be of the same type which u r using to create internal table.
you have declared ur type in program. it wont work. you have to define structure in DDIC using se11.
then declare both in prgm as well as in smart form refering to that structure.
hope u got it now?
reward if helpful.
regards
Azad.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.