‎2006 Mar 27 11:20 AM
Guy's
i am working on M&S issue,i change existing ALV to add
new field ,but it's displaying filed and no value for
that field,when i check in debugging mode,value exist
for particular field,pls let me know what's the issue.
guy's for your reference following is the code:
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = W_REPID
*MOD01{
I_CALLBACK_PF_STATUS_SET = 'SET_STATUS' "MOD01
I_SAVE = 'X'
*MOD01}
I_GRID_TITLE = TEXT-T01
IS_LAYOUT = W_LAYOUT
IT_FIELDCAT = T_FIELDCAT_ALV
TABLES
T_OUTTAB = T_FINAL
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC NE 0.
MESSAGE S999(ZK) WITH TEXT-E04. "No Valid data found
STOP.
ENDIF.
FORM FIELDCAT_BUILD USING FP_FIELDNAME
FP_SELTEXT_M
FP_OUTPUTLEN.
W_INDEX = W_INDEX + 1.
W_FIELDCAT_ALV-FIELDNAME = FP_FIELDNAME.
W_FIELDCAT_ALV-TABNAME = C_TAB_NAME.
W_FIELDCAT_ALV-SELTEXT_M = FP_SELTEXT_M.
W_FIELDCAT_ALV-OUTPUTLEN = FP_OUTPUTLEN.
W_FIELDCAT_ALV-COL_POS = W_INDEX.
APPEND W_FIELDCAT_ALV TO T_FIELDCAT_ALV.
CLEAR W_FIELDCAT_ALV.
ENDFORM. " fieldcat_
PERFORM FIELDCAT_BUILD USING : 'WERKS' TEXT-H01 5,
'AUART' TEXT-H02 10,
'AUFNR' TEXT-H03 12,
'GAMNG' TEXT-H04 16,
'MAINM' TEXT-H05 18,
'MAKTX' TEXT-H06 35,
'MATNR' TEXT-H07 18,
'MTEXT' TEXT-H08 35,
'STPRS' TEXT-H09 16,
'MNGKO' TEXT-H19 16,
'BOMRQ' TEXT-H10 16,
'REQ_QUAN' TEXT-H11 16,
'WITHD_QUAN' TEXT-H12 16,
'REM_QTY' TEXT-H13 16,
'REM_AMT' TEXT-H14 16,
'BOM_IND' TEXT-H15 17,
'REL_IND' TEXT-H16 8,
'DEL_IND' TEXT-H17 9,
<b>'BOM_MAT' TEXT-H17 9,]</b>
'POSIT' TEXT-H18 17.
‎2006 Mar 27 11:48 AM
Hi Sanju,
show your T_FINAL declaration. is there a field BOM_MAT in your internal table check it.
Regards
Vijay
‎2006 Mar 27 11:25 AM
Sanju,
I can see that you changed the field catalog because of which its showing up in the output.
Have you modified the table T_FINAL to add the new column and also are you updating the column with the data you want to display? Couldn't see that in the code.
Regards,
Ravi
Note : Please mark the helpful answers.
‎2006 Mar 27 11:25 AM
Hi Sanju,
if the field is displayed in the output then the fieldcatalogue is not the problem..
there shud be no value present in T_FINAL table fro thet field..
regards
satesh
‎2006 Mar 27 11:33 AM
Hi Sanju,
Have u declared the added field in your internal table with same name as in ur fieldcatalog i.e BOM_MAT
‎2006 Mar 27 11:48 AM
Hi Sanju,
show your T_FINAL declaration. is there a field BOM_MAT in your internal table check it.
Regards
Vijay
‎2006 Mar 27 12:15 PM
Guy's
issue is solved m i didn't declare that in my internal
table,i declared that with some other name,
can you tell me why that happen
‎2006 Mar 27 12:26 PM
Hopu u understood my answer previous answer!!!!!
the names which u specify in the fieldcatalog and the internal table should be same so that the fieldcatalog will recognize which value to pick and put in that field
‎2006 Mar 27 12:34 PM
Hi Sanju,
if you give wrong name it will look for that field in internal table, if it is not there then it will not display any value. that is what happened in your case.
Regards
Vijay