Skip to Content

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

sap upgrade problem

hi all,

i m doing upgrade from sap4.7 to ecc6.0, when i m executing a program,

DATA: BEGIN OF WAGETYPES,

LGA LIKE P0008-LGA01,

BET LIKE P0008-BET01,

END OF WAGETYPES.

START-OF-SELECTION.

GET PERNR.

  • PROVIDE * FROM P0008 BETWEEN PN-BEGDA AND PN-ENDDA.

RP_PROVIDE_FROM_LAST P0008 SPACE PN-BEGDA PN-ENDDA.

DO 20 TIMES VARYING WAGETYPES

FROM P0008-LGA01

NEXT P0008-LGA02.

IF WAGETYPES-LGA IS INITIAL.

EXIT.

endif.

its giving an error "P0008-LGA01" and "WAGETYPES" are type-incompatible. can anyone please tell me that what should i do?

regards saurabh.

Tags:
replied

Hi,

By using field sybols u can avoid

FIELD-SYMBOLS <WAGETYPES> LIKE P0008-LGA01.
DATA inc TYPE i.
DO 20 TIMES. 
          inc = sy-index  - 1. 
          ASSIGN P0008-LGA01 INCREMENT inc TO         <WAGETYPES>  RANGE P0008. 
 IF WAGETYPES-LGA IS INITIAL.
     EXIT.
endif.
ENDDO.

Also check:

DO - varying SAP help.

Regards

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