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: 

Urgent

Former Member
0 Kudos

Hi All,

Can someone please explain me what this piece of code is doing,

CLEAR NUM_OP.

IF RESB-BAUST = '0'.

NUM_OP = resb-posnr.

ELSE.

SELECT SINGLE POSNR INTO (NUM_OP)

FROM *RESB

WHERE AUFST EQ RESB-BAUST

AND AUFWG EQ RESB-BAUWG

AND MATNR EQ RESB-BAUGR.

ENDIF.

I find this in one query. Await your responses.

Vivek

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

This query is populating <b>posnr</b> field into variable <b>num_op</b> if <b>resb-baust</b> = 0.In second condition, it is selecting first record & populating <b>posnr</b> field into variable <b>num_op</b> that is satisfying <b>aufst ,aufwg & matnr</b> fields of <b>*RESB</b> with the fields <b>baust, bauwg & baugr</b> of <b>RESB</b>.

Hope this helps.

Reward if helpful.

Regards,

Sipra

8 REPLIES 8

former_member404244
Active Contributor
0 Kudos

Hi,

*RESB is nothing but resb only....if the value of baust is not '0' then its selecting from db table and populating the NUM_OP value.

Regards,

Nagaraj

Former Member
0 Kudos

HI

*RESB is the replica of the RESB table, it will hold all the data same as RESB.

if you want to change the RESB values without intrupting the database thne you can change in *RESB.

we can find this of quries in SAPSCRIPT driver programs

Regards

Sudheer

Former Member
0 Kudos

Hi

*RESB is the nothing but the same RESB table,if you want to change the RESB values without intrupting the database thne you can change in *RESB.

Reward all helpfull answers

Regards

Pavan

Former Member
0 Kudos

Hi,

This query is populating <b>posnr</b> field into variable <b>num_op</b> if <b>resb-baust</b> = 0.In second condition, it is selecting first record & populating <b>posnr</b> field into variable <b>num_op</b> that is satisfying <b>aufst ,aufwg & matnr</b> fields of <b>*RESB</b> with the fields <b>baust, bauwg & baugr</b> of <b>RESB</b>.

Hope this helps.

Reward if helpful.

Regards,

Sipra

0 Kudos

Hi Sipra,

Thanks a lot for that info, it is quite clear now. But i would like to know about what exactly these fields mean, BAUST, BAUWG, BAUGR, AUFST, AUFWG. I know what it stands for, but a little confused as to how to interpret the same or should i ask this qns in PP forum?

Vivek

0 Kudos

Hi Vivek,

If you post it there you will get clear & detailed relevant answers.

Hope this helps.

Reward if helpful.

Regards,

Sipra

0 Kudos

Hi Vivek,

If you post it there you will get clear & detailed relevant answers.

Hope this helps.

Reward if helpful.

Regards,

Sipra

0 Kudos

Hi Sipra

Thanks for that, will post my qns there.

Regards,

Vivek