on 2006 Nov 30 10:48 AM
hi,
i have problem while i try to pass my field catalog internal table to IT_FIELDCAT in REUSE_ALV_HIERSEQ_LIST_DISPLAY .
FORM FIELD_CATALOG .
CLEAR WA_FIELDC.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = WA_REPID
I_INTERNAL_TABNAME = 'IT_HEAD' "I_INTERNAL_TABNAME
I_STRUCTURE_NAME = 'VBAK' "I_STRUCTURE_NAME
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = WA_REPID "I_INCLNAME
I_BYPASSING_BUFFER = I_BYPASSING_BUFFER
I_BUFFER_ACTIVE = I_BUFFER_ACTIVE
CHANGING
CT_FIELDCAT = IT_FIELDC
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
.
DELETE IT_FIELDC WHERE FIELDNAME <> 'AUTLF' AND
FIELDNAME <> 'KUNNR' AND
FIELDNAME <> 'VSBED' AND
FIELDNAME <> 'LIFSK' AND
FIELDNAME <> 'AUGRU' AND
FIELDNAME <> 'VBELN' AND
FIELDNAME <> 'BSTKD' AND
FIELDNAME <> 'ZTERM' AND
FIELDNAME <> 'PRSDT' AND
FIELDNAME <> 'INCO1' AND
FIELDNAME <> 'INCO2' .
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = WA_REPID
I_INTERNAL_TABNAME = 'IT_ITEM' "I_INTERNAL_TABNAME
I_STRUCTURE_NAME = 'VBAP' "I_STRUCTURE_NAME
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = WA_REPID "I_INCLNAME
I_BYPASSING_BUFFER = I_BYPASSING_BUFFER
I_BUFFER_ACTIVE = I_BUFFER_ACTIVE
CHANGING
CT_FIELDCAT = IT_FIELDC1
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
.
DELETE IT_FIELDC1 WHERE FIELDNAME <> 'POSNR' AND
FIELDNAME <> 'MATNR' AND
FIELDNAME <> ' WERKS' AND
FIELDNAME <> 'LPRIO' AND
FIELDNAME <> 'KWMENG' AND
FIELDNAME <> 'ABGRU' AND
FIELDNAME <> 'MAKTX' AND
FIELDNAME <> 'VDATU' AND
FIELDNAME <> 'PRSDT' AND
FIELDNAME <> 'VBELN' .
LOOP AT IT_FIELDC1 INTO WA_FIELDC.
APPEND WA_FIELDC TO IT_FIELDC. <----
ENDLOOP.
*want to pass IT_FIELDC to IT_FIELDCAT in REUSE_ALV_HIERSEQ_LIST_DISPLAY ,but getting dump error finally.
ganesh
Hi siva,
when u use APPEND both the workare structure and internal table structure should be same
use this
LOOP AT IT_FIELDC1 INTO WA_FIELDC.
move-corresponding WA_FIELDC TO IT_FIELDC.
append it_fieldc.
ENDLOOP.
Message was edited by:
chandrasekhar jagarlamudi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks to all of you,i created a 2 new structures globally according to my it_HEAD and IT_ITEM ,then i passed these 2 structure to I_STRUCTURE_NAME of my 2 fieldcatalog merge FM.
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi siva,
i think you are reading the table into another table work area.
change it and check.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
the wa and the itab must be of the same str. else can u see what is the sy-tabix value.
santhosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check the structure of WA_FIELDC and IT_FIELDC.
See whether both are same .
Also try :
LOOP AT IT_FIELDC1 INTO WA_FIELDC.
Move corresponding WA_FIELDC TO IT_FIELDC.
ENDLOOP.
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
71 | |
10 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.