Application Development 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: 

hi experts see this code is not executing

Former Member
0 Kudos

hi experts see this code is not executing ,

report ZEX.

DATA: BEGIN OF wa_s039,

matnr type s039-matnr,

mbwbest TYPE S039-mbwbest,

END OF wa_s039.

data: it_s039 like TABLE OF wa_s039.

SELECT matnr mbwbest INTO TABLE IT_s039 FROM S039 UP TO 10 ROWS.

LOOP at it_s039 into wa_s039.

WRITE : wa_s039-matnr , wa_s039-mbwbest.

ENDLOOP.

see and help me ,

regards,

kumar

12 REPLIES 12

Former Member
0 Kudos

DATA: BEGIN OF wa_s039,

matnr type s039-matnr,

mbwbest TYPE S039-mbwbest,

END OF wa_s039.

data: it_s039 like TABLE OF wa_s039.

Change tihs:

SELECT matnr mbwbest

FROM S039 UP TO 10 ROWS

INTO wa_s039 .

append wa_s039 to it_s039.

Endselect.

LOOP at it_s039 into wa_s039.

WRITE : wa_s039-matnr , wa_s039-mbwbest.

ENDLOOP.

Edited by: Neha Shukla on Nov 29, 2008 11:56 AM

Former Member
0 Kudos

Hi Kumar.

Its working with me. Wats the problem u r getting can u plz elaborate it in detail.

Mohamed_Mukhtar
Active Contributor
0 Kudos

Hi kumar,

Goto SE11,

Give the table name S039 and check the contents of the tables.

I think S039 is empty.

Thanks & Regards

0 Kudos

yes man

thanks for

but i need valuated stock detal from TR: MC.9.

IN WISH TABLE I WILL GET .

PLZ HELP ME

Former Member
0 Kudos

Hi,

Always use a SY-SUBRC check after the SELECT Statement......

Former Member
0 Kudos

Hi

Try like this

TYPES: BEGIN OF ty_s039,

matnr TYPE s039-matnr,

mbwbest TYPE s039-mbwbest,

END OF ty_s039.

DATA: it_s039 TYPE STANDARD TABLE OF ty_s039,

wa_s039 TYPE ty_s039.

SELECT matnr mbwbest INTO TABLE it_s039 FROM s039 UP TO 10 ROWS.

IF sy-subrc EQ 0.

LOOP AT it_s039 INTO wa_s039.

WRITE : wa_s039-matnr , wa_s039-mbwbest.

ENDLOOP.

ENDIF.

Regards

Rasheed

Edited by: Rasheed salman on Nov 29, 2008 7:53 AM

0 Kudos

HI THANKS FOR REPLY,

IN S039 TABLE DATA IS NOT THERE.

FROM I GET THE BELOW REQIRED DATA

i need valuated stock value from TR: MC.9.

IN WISH TABLE I WILL GET .

PLZ HELP ME

0 Kudos

hi

plz try this

MBEW-BKLAS

Regards

0 Kudos

thanks for giving sugetion salman,

i given points to u.

i got the problem.

and one more salman for this pertucular transaction the data is stored in this table , how we will find sir

i am expecting anser from u

thanks & regards

kumar

0 Kudos

Hi Kumar,

We answer the querys not for points its a gud knowledge sharing.

any the answer for ur query is

press F1 for tht particular field and u get sum documentation for tht field in tht press technical help button u will get table and field.

even u have more threads in SDN u can sreach for this

Regards

0 Kudos

OK SALMAN,

THANKS FOR SHARING

REGARDS

SRINIVAS

Former Member
0 Kudos

answered