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: 

RESB Table Update

Former Member
0 Kudos

Hi Guys,

The problem is bit tricky. I want to update RESB table with a batch number so obvious solution should be BAPI_RESERVATION_CHANGE. But the problem is its throwing an error message that reservation creation is an automatic process manual change is not possible. But to meet the business requirement I have to update the RESB table with a batch number. So apart from a direct updation of RESB table [Not a good solution] could any one please help me by giving any possible solution or function module name.

Thanks in Advance.

Best Regs,

Somnath

9 REPLIES 9

Former Member
0 Kudos

USE <b>BAPI_RESERVATION_CREATE</b> TO CREATE NEW ENTRIES

0 Kudos

Hi Amit I don't want to create any entry. I just want to update a newly generated batch numer a particular component.

0 Kudos

Dear here is solution.

This reservation has been generated automatically by the system and can, therefore, not be changed manually. You can only change automatically generated reservations by changing the document (for example, the production order) to which the reservation refers.

Do this ..

To change the reservation, proceed as follows:

1. Find out for which document the reservation has been made. To do this, display the reservation using transaction MB23.

2. Change the originating document. The system will then change the reservation accordingly.

reward if useful.

Amit Singla

0 Kudos

Thanks for the feedback Amit.

But I think I didn't place the question correctly. What ever you said is correct that get the docuement and change the document with proper batch number then batch will be updated. It makes sense also. But this things is supposed to be done programatically. As BAPI is throwing some error so alternate solution could be BDC. Again there is a problem the user might not be having the authorization to change the data so BDC will fail in that scenario.

So apart from updating RESB table I couldn't find any other alternate solution.Please let me know if you have any alternate approach.

0 Kudos

Dear,

The only way to change the batch number is to change the document.

Although you can change the batch number using user-exit in standard transaction,

for this you must have to done somthing like this.

create a Z master table, with reservation number , batch number, user-id(sy-uname) or as per your requirement.

.

now in user exit you can manipulate the change of batch number for a reservation and user.

then in user exit write this :

data : wa_resevation like RESB-reservation.

data : wa_batch like RESb-batch

clear wa_reservation.

clear wa_batch.

select single reservation batch from zreservation(your z table) into ( wa_resvation , wa_batch) where reservation eq RESB-reservation and uname eq sy-uname and

batch ne RESB-batch.

if sy-subrc eq 0.

clear RESB-batch .

RESB-batch = wa_batch.

endif.

in your ztable (zreservation)

these are the fields

mandt

reservation -- key field and check table is resb .winth cardinity 1 : n.( this is because same reservation can be happen for number of users with different batch numbers)

uname -key field

batch

check these user exits.

EXIT_SAPMM07M_001

EXIT_SAPM07DR_001

EXIT_SAPM07DR_002

EXIT_SAPLMIGO_001

EXIT_SAPMM07M_005

EXIT_SAPMM07R_001

EXIT_SAPMM07M_009

EXIT_SAPLMB_BUS2093_001

EXIT_PP_PICK_LIST_001

EXIT_SAPLMBMB_001

set brak-points and run MB22 and see in which exit program stops.

and put your code in that exit where program stops.

and check RESB may be XRESB there.

reward if ueful..

Amit Singla

Former Member
0 Kudos

Hi

check the fun modules

MB_CHANGE_RESERVATION

CHANGE_RESERVATION

FMR0_WF_UPDATE_RESERVATION

MB_CIF_RESERVATION_CHANGE

Regards

Anji

0 Kudos

Dear here is solution.

This reservation has been generated automatically by the system and can, therefore, not be changed manually. You can only change automatically generated reservations by changing the document (for example, the production order) to which the reservation refers.

Do this ..

To change the reservation, proceed as follows:

1. Find out for which document the reservation has been made. To do this, display the reservation using transaction MB23.

2. Change the originating document. The system will then change the reservation accordingly.

reward if useful.

Former Member
0 Kudos

Hi,

If you are able to update the reservation using BDC..Then create a batch job for your program..And then have the batch user ID update the document..Instead of the person running the program..

Thanks

Naren

Former Member
0 Kudos

I have solved the issue by updating the RESB table directly as it was not possible to update Batch field with any BAPI or function module and it is not anyway going to impact the other business process as per the requirement as exisiting process.

Thanks all of you for providing feedback.

Somnath