Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

case statment for changeid

Hi Experts

I want to modify a code by displaying CDPOS-CHNGIND = 'EDIT' if

CDPOS-CHNGIND ='E' . U as Update, I as Insert , D as delete.

It is displying in my ALV grid as U,I,E,D in the type

clear st_fieldcat.

add 1 to lva_col_pos.

st_fieldcat-tabname = 'PA_IT_MERGED'.

st_fieldcat-fieldname = 'CHNGIND'.

st_fieldcat-ref_tabname = 'CDPOS'.

st_fieldcat-ref_fieldname = 'CHNGIND'.

st_fieldcat-row_pos = '6'.

st_fieldcat-col_pos = lva_col_pos.

append st_fieldcat to pa_it_fieldcat.

regards

Tags:
Former Member
Former Member replied

CASE CDPOS-CHANGIND.
WHEN 'E'.
CDPOS-CHANGIND = 'EDIT'  .
WHEN 'U'.
CDPOS-CHANGIND = 'Update'   .
WHEN 'I'.
CDPOS-CHANGIND = 'Insert'    .
WHEN 'D'.
CDPOS-CHANGIND = 'Delete'    .
ENDCASE.




Hi It was missing dots after each line

regards

Nishant

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question