Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Functionmodule exits

Former Member
0 Likes
596

Hi,

I am working on enhament

EXIT_SAPLESBP_001

importing parameter is

IMPORTING

*" VALUE(X_BPMODE) LIKE TE950-BPMODE DEFAULT SPACE

*" REFERENCE(X_DATA) TYPE ISU06_SPECIALS_LOG

this ISU06_SPECIALS_LOG contains componeent TPOS

and this TPOS contains EVER , V_EANL

Here I want to get information for Table Ever.

How should i wite loop statment

Loop at X_data-TPOS-EVER into wa. endloop.

How should wa declared.

Thanks,

Sonar

1 ACCEPTED SOLUTION
Read only

brad_bohn
Active Contributor
0 Likes
556

data: wa type EVER.
5 REPLIES 5
Read only

brad_bohn
Active Contributor
0 Likes
557

data: wa type EVER.
Read only

Former Member
0 Likes
556

data: wa type ever.

loop at X_DATA-TPOS-EVER into wa.

error message dispalyed as

" The data object x_DATA does not have a component called 'TPOS-EVER'. "

Read only

0 Likes
556

EVER is not a table, and you can not loop at that level. TPOS is a table, hence you can loop at that level.

data: wa type ISU06_SPECIALS_LOG_POS.


loop at X_DATA-TPOS into wa.

* Now you should have access to the EVER structure, and you can access its fields.
write:/   wa-ever-VERTRAG.
write:/   wa-ever-BUKRS.
write:/   wa-ever-KOSTL.

endloop.

Regards,

Rich Heilman

Read only

brad_bohn
Active Contributor
0 Likes
556

EVER isn't a table though so your LOOP construct isn't correct...


DATA: wa_tpos TYPE isu06_specials_log_pos.

LOOP AT x_data-tpos INTO wa_tpos.

  IF wa_tpos-ever-bukrs EQ '0001'.
*  ... do something
  ENDIF.

ENDLOOP.

Read only

Former Member
0 Likes
556

Thanks Rich, Its Working fine.