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: 

Reservation

former_member1326872
Participant
0 Kudos

Hi,

In my program, I have to check whether a material has any open reservation. Could anyone please tell me how should I check that in a program?

Thanks..

Uma.

6 REPLIES 6

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Maybe you could look at the reservation table RESB.

Regards,

Rich Heilman

0 Kudos

How should I get the open reservations from that table?

how will i check whether it is open or closed? I can only see the Deleted field in that table, which says whether the reservation is deleted or not.

Please let me know..

Thanks

Uma

0 Kudos

KZEAR = space

0 Kudos

If I just check in RESB table for KZEAR = space, it is giving a list of open reservation. But if check for that reservation in MB23, for few reservations it says "Reservation 0000000522 does not exist".

Is there any other way to check for open reservations? I tried using "BAPI_RESERVATION_GETITEMS" to get any open reservations, but even this is giving similar result as looking for in table RESB for KZEAR = space

Please let me know if there are any other way to find open reservations.

Thanks..

Uma.

0 Kudos

Check like this,


  SELECT *
         FROM  RESB
         APPENDING TABLE PET_RESB
         WHERE MATNR IN S_MATNR
         AND   WERKS IN S_WERKS
         AND   BDTER IN S_BDTER
         AND   SCHGT =  SP_SCHGT         "OPL993 nur/kein Schüttgut
         AND   XLOEK = SPACE.
* Filtern lt. Selektion

* Filtern lt. Selektion
  PERFORM FILTER_BEDARFE CHANGING IT_RESB[].
FORM FILTER_BEDARFE CHANGING PIET_RESB TYPE RESB_TAB.

  CHECK ALLES IS INITIAL.

  LOOP AT PIET_RESB INTO WA_RESB.
    IF WA_RESB-RESB-ENMNG >= WA_RESB-RESB-BDMNG
    OR WA_RESB-RESB-KZEAR <> SPACE.
      DELETE PIET_RESB.
    ENDIF.
  ENDLOOP.

ENDFORM.                    " filter_bedarfe

Vasanth

Former Member
0 Kudos

Main table is : RESB

FM : HRCA_MAT_RESITEM_GET