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

Tricky problem (RESB Table)

Former Member
0 Likes
2,257

Hi All,

I am facing quite a tricky problem, hope someone can help me with the logic for the below:

Sample RESB Table data

WERKS -- MATNR -- POSNR -- BAUGR -- XFEHL

1000 -- B1001 -- 0010 -- A1000 -- X

1000 -- C1041 -


C104 -- A1000 -- (blank)

1000 -- R1011 -- 0001 -- C1041 -- (blank)

1000 -- R1012 -- 0001 -- C1041 -- X

1000 -- R1013 -- 0001 -- C1041 -- (blank)

1000 -- F1010 -- A210 -- A1000 -- (blank)

My Req: I want to find if the field XFEHL contains 'X' for the combination of BAUGR & POSNR

The below Code works fine for the materials starting with R, because they are all pegged to C1041 & the POSNR of C1041 does not change, so i dont have to consider it.

But my problem is for materials starting with B, C & F, although they are all pegged to A1000, the POSNR is different.

SELECT XFEHL INTO WL_XFEHL

FROM RESB

WHERE WERKS EQ S_WERKS

AND RSNUM EQ S_RSNUM

AND BAUGR EQ S_BAUGR

AND XLOEK EQ SPACE

AND KZEAR EQ SPACE

AND DUMPS EQ SPACE

AND SCHGT EQ SPACE

AND XFEHL NE SPACE.

ENDSELECT.

I hope i was able to put across my problem clearly. Await suggestions.

Regards,

Vivek

Edited by: Alvaro Tejada Galindo on Feb 7, 2008 11:29 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,421

Hi,

The are Function modules to read data from RESB

A few of them.

If you could give the Sample data clearly we can proceed further.

CO_BT_RESB_READ_WITH_INDEX

CO_BT_RESB_READ_WITH_KEY

CO_BT_RESB_READ_WITH_SPLRV

CO_BT_RESB_RSCOMP_INDEX_GET

CO_BT_RESB_SET

CO_BT_RESB_UPDATE.

Regards

Bala.M

3 REPLIES 3
Read only

Former Member
0 Likes
1,422

Hi,

The are Function modules to read data from RESB

A few of them.

If you could give the Sample data clearly we can proceed further.

CO_BT_RESB_READ_WITH_INDEX

CO_BT_RESB_READ_WITH_KEY

CO_BT_RESB_READ_WITH_SPLRV

CO_BT_RESB_RSCOMP_INDEX_GET

CO_BT_RESB_SET

CO_BT_RESB_UPDATE.

Regards

Bala.M

Read only

0 Likes
1,421

Hi Bala & Mylene,

Thanks for the post. Yes CO24 does work no problem. I am trying to build a query report which will not display the entire set of material belonging to a particular BAUGR - POSNR combination.

Not quite sure how i can phrase my problem, but will give it a try.

As per my initial post, i am looping to find if XFEHL is 'X' for all materials which are pegged to a particular material. But i also need to ensure that the POSNR of the BAUGR field is the same as in the case of materials starting with R.

I want it same as what we find in CO24 or CO27 output, but not sure which FM can give me that.

I dont know if i have been able to put across my problem clearly.

Vivek

Read only

Former Member
0 Likes
1,421

why does transaction CO24 not work for you?