Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Runtime Error on call CBIH_IA02_LIST_DISPLAY

Former Member
0 Likes
997

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
974

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.

6 REPLIES 6
Read only

Former Member
0 Likes
974

how did you declare X_IOTAB ? it should be of type CCIHS_IALHIOT.

Read only

Former Member
0 Likes
974

Sujamo I didn't declare any X_IOTAB .

For what is it necessary and how can I declare it correctly.

Regards

ertas

Read only

Former Member
0 Likes
974

I am really sorry Ilhan. what i meant was, how did you declare LG_IOTAB . ?

Read only

Former Member
0 Likes
975

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.

Read only

0 Likes
974

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.

Read only

Former Member
0 Likes
974

Sujamol Augustine

you are the best.

Regards

ertas