2008 Apr 29 7:19 PM
Hello Experts!
Can you please give me an example how to call this
FM -> CBIH_IA02_LIST_DISPLAY ?
I get the message:
In the function module interface, you can specify only
fields of a specific type and length under "X_IOTAB".
Although the currently specified field
"LG_IOTAB" is the correct type, its length is incorrect.
CALL FUNCTION 'CBIH_IA02_LIST_DISPLAY'
* EXPORTING
* I_PF_STATUS_FUNC = 'CBIH_IA02_SET_PF_ST'
* I_USER_COMMAND_FUNC = 'CBIH_IA02_USER_COMM'
* I_LAYOUT_CHANGE_FUNC = 'CBIH_IA02_LAY_SET'
* I_MASTERSTRUCT_NAME = 'CCIHS_IAHITM'
* I_SLAVESTRUCT_NAME = 'CCIHS_IAHITS'
TABLES
x_iotab = LG_IOTAB
i_ipiotab = LG_IPIOTAB
i_ipevaiotab = LG_IPEVA_IOTAB
e_mastertab = LG_MASTERTAB
e_slavetab = LG_SLAVETAB
* EXCEPTIONS
* NO_IALID = 1
* MASTER_SLAVE_ERROR = 2
* LIST_DISPL_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.
2008 Apr 29 7:51 PM
No problem !
Here my declarations:
TYPES: IORECORD_TYPE LIKE RCGPHIOT. " RCGRRISIOT.
DATA: LG_IOTAB TYPE IORECORD_TYPE OCCURS 1000
WITH HEADER LINE.
DATA: LG_IPIOTAB LIKE CCIHS_IPIOT OCCURS 1000 WITH HEADER LINE.
DATA: LG_IPEVA_IOTAB LIKE CCIHS_IPEVAIOT OCCURS 1000 WITH HEADER LINE.
DATA: LG_MASTERTAB LIKE CCIHS_IAHITM OCCURS 1000 WITH HEADER LINE.
DATA: LG_SLAVETAB LIKE CCIHS_IAHITS OCCURS 1000 WITH HEADER LINE.
parameters pa type ccihs_ialhiot-iatype.
select * from cciht_ial into
corresponding fields of table l_api_header_tab
where iatype = pa .
READ table l_api_header_tab INTO l_api_header_wa INDEX 1.
*LOOP AT l_api_header_tab INTO l_api_header_wa.
move-corresponding l_api_header_wa to LG_IOTAB .
append LG_IOTAB .
*ENDLOOP.
CALL FUNCTION 'CBIH_IA02_LIST_DISPLAY'
* EXPORTING
* I_PF_STATUS_FUNC = 'CBIH_IA02_SET_PF_ST'
* I_USER_COMMAND_FUNC = 'CBIH_IA02_USER_COMM'
* I_LAYOUT_CHANGE_FUNC = 'CBIH_IA02_LAY_SET'
* I_MASTERSTRUCT_NAME = 'CCIHS_IAHITM'
* I_SLAVESTRUCT_NAME = 'CCIHS_IAHITS'
TABLES
x_iotab = LG_IOTAB
i_ipiotab = LG_IPIOTAB
i_ipevaiotab = LG_IPEVA_IOTAB
e_mastertab = LG_MASTERTAB
e_slavetab = LG_SLAVETAB.
Hello Experts!
Can you please give me an example how to call this
FM -> CBIH_IA02_LIST_DISPLAY ?
I get the message:
In the function module interface, you can specify only
fields of a specific type and length under "X_IOTAB".
Although the currently specified field
"LG_IOTAB" is the correct type, its length is incorrect.
CALL FUNCTION 'CBIH_IA02_LIST_DISPLAY'
* EXPORTING
* I_PF_STATUS_FUNC = 'CBIH_IA02_SET_PF_ST'
* I_USER_COMMAND_FUNC = 'CBIH_IA02_USER_COMM'
* I_LAYOUT_CHANGE_FUNC = 'CBIH_IA02_LAY_SET'
* I_MASTERSTRUCT_NAME = 'CCIHS_IAHITM'
* I_SLAVESTRUCT_NAME = 'CCIHS_IAHITS'
TABLES
x_iotab = LG_IOTAB
i_ipiotab = LG_IPIOTAB
i_ipevaiotab = LG_IPEVA_IOTAB
e_mastertab = LG_MASTERTAB
e_slavetab = LG_SLAVETAB
* EXCEPTIONS
* NO_IALID = 1
* MASTER_SLAVE_ERROR = 2
* LIST_DISPL_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.
2008 Apr 29 7:36 PM
how did you declare X_IOTAB ? it should be of type CCIHS_IALHIOT.
2008 Apr 29 7:42 PM
Sujamo I didn't declare any X_IOTAB .
For what is it necessary and how can I declare it correctly.
Regards
ertas
2008 Apr 29 7:44 PM
I am really sorry Ilhan. what i meant was, how did you declare LG_IOTAB . ?
2008 Apr 29 7:51 PM
No problem !
Here my declarations:
TYPES: IORECORD_TYPE LIKE RCGPHIOT. " RCGRRISIOT.
DATA: LG_IOTAB TYPE IORECORD_TYPE OCCURS 1000
WITH HEADER LINE.
DATA: LG_IPIOTAB LIKE CCIHS_IPIOT OCCURS 1000 WITH HEADER LINE.
DATA: LG_IPEVA_IOTAB LIKE CCIHS_IPEVAIOT OCCURS 1000 WITH HEADER LINE.
DATA: LG_MASTERTAB LIKE CCIHS_IAHITM OCCURS 1000 WITH HEADER LINE.
DATA: LG_SLAVETAB LIKE CCIHS_IAHITS OCCURS 1000 WITH HEADER LINE.
parameters pa type ccihs_ialhiot-iatype.
select * from cciht_ial into
corresponding fields of table l_api_header_tab
where iatype = pa .
READ table l_api_header_tab INTO l_api_header_wa INDEX 1.
*LOOP AT l_api_header_tab INTO l_api_header_wa.
move-corresponding l_api_header_wa to LG_IOTAB .
append LG_IOTAB .
*ENDLOOP.
CALL FUNCTION 'CBIH_IA02_LIST_DISPLAY'
* EXPORTING
* I_PF_STATUS_FUNC = 'CBIH_IA02_SET_PF_ST'
* I_USER_COMMAND_FUNC = 'CBIH_IA02_USER_COMM'
* I_LAYOUT_CHANGE_FUNC = 'CBIH_IA02_LAY_SET'
* I_MASTERSTRUCT_NAME = 'CCIHS_IAHITM'
* I_SLAVESTRUCT_NAME = 'CCIHS_IAHITS'
TABLES
x_iotab = LG_IOTAB
i_ipiotab = LG_IPIOTAB
i_ipevaiotab = LG_IPEVA_IOTAB
e_mastertab = LG_MASTERTAB
e_slavetab = LG_SLAVETAB.
2008 Apr 29 8:02 PM
please compare the structures, RCGPHIOT and CCIHS_IALHIOT.
you can notice that there is differenc ein the structures..
these fields are missing in RCGPHIOT. where as the FM is looking for a structure with all those..
IALID
IATYPE
IAPLANT
OBJNR
IASTATUS
EVDESC
DMTYPE
TPLNR
EQUNR
EQDESC
please change to
TYPES: IORECORD_TYPE LIKE CCIHS_IALHIOT.
2008 Apr 29 8:19 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |