Skip to Content

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

Enhance generic datasource

I developed a generic datasource and need some enhancements to custom fields. I got the following error in my ABAP code.

Field "ZOXDV10019-ZZENDUSER" is unknown.

Here is my code,

&----


*& Include ZXRSAU01

&----


TABLES: VBPA.

DATA: l_s_zsales LIKE ZOXDV10019,

l_counter,

l_tabix LIKE SY-TABIX.

CASE i_datasource.

WHEN 'ZSALES'.

  • Endless loop for debugging *

  • l_counter = 7.

  • while l_counter = 7.

  • endwhile.

  • Find end-user in the VBPA transaction data table

LOOP AT c_t_data INTO l_s_zsales.

l_tabix = SY-TABIX.

SELECT SINGLE * FROM VBPA WHERE VBELN = l_s_zsales-VBELN AND POSNR = '000000' AND PARVW = 'Z1'.

  • Fill fields with data from the VBPA transaction data table

IF SY-SUBRC = 0.

ZOXDV10019-ZZENDUSER = VBPA-KUNNR.

MODIFY c_t_data FROM ZAZOXDV10019 INDEX l_tabix.

ENDIF.

ENDLOOP.

Why SAP couldn't recognize the field of my appended structure?

replied

hi Du,

you should use l_s_zsales instead of ZOXDV10019.

l_s_zsales-ZZENDUSER = VBPA-KUNNR.

MODIFY c_t_data FROM l_s_zsales INDEX l_tabix.

hope this helps.

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