cancel
Showing results for 
Search instead for 
Did you mean: 

Mass update sales reason of rejection

antonio_bruno
Participant
0 Kudos

Hi,

I need a LSMW to update the reason of rejection related to only particular sales order position.

It's impossible with MASS and with batch input recording. In particular I've try to reply the recording of:

  1. the MASS, but at the end didn't save the datas.
  2. the VA02 with mass rejection, but there are different closed positions for different documents, so it didn't work.

Thanks and regards.

Antonio

Accepted Solutions (1)

Accepted Solutions (1)

Jelena
Active Contributor
0 Kudos

If you can't use MASS then you'd be better off writing an ABAP report for this. Even if you do get a recording for line item change, it's difficult to use it with LSMW. It's a well-known issue with recordings and BDC that it usually does not operate with item numbers but with the line numbers on the screen.

It is possible to update rejection reason using BAPI, I've answered many such posts on SCN over the years.

Besides, LSMW is a migration tool by nature, it's not meant for the regular data maintenance activities.

antonio_bruno
Participant
0 Kudos

Hi,

I'm not expert in ABAP and BAPI. Could you please help me?

Thanks.

ravi_kumar100
Active Contributor
0 Kudos

Hi,

I just tried the same through MASS. Refer the attached screen shot.

Check it in a Test System before attempting it in PRD.

Regards,

SRK

former_member184771
Contributor
0 Kudos

Dear Antinio,

As indicated by SRK you can check for MASS as instructed, or else via sales order change bapi you can easily archive what you required please refer BAPI: BAPI_SALESORDER_CHANGE.

Please refer the below thread:

Standard bapi sales order change | SCN

https://scn.sap.com/thread/1156637

Further go to Tcode: SE37 - Enter - BAPI_SALESORDER_CHANGE- execute. After that set the required value as indicated below:

Under Import parameters

SALESDOCUMENT: Enter the sales document no.

ORDER_HEADER_INX: Enter UPDATEFLAG flag as U.

LOGIC_SWITCH: COND_HANDL as X

Under Tables


For ORDER_ITEM_IN


Use ITM_NUMBER as sales order item no.

MATERIAL as sales order materail code for perticulat item no.

REASON_REJ as per your requiredment


For ORDER_ITEM_INX


Enter -  X for the above field user in ORDER_ITEM_IN


And Save it. and give the test data no. to your technical consultant and involve technical guy, he will develop a change program for you which will short out you issue.

Thanks.

SS

Answers (2)

Answers (2)

Lakshmipathi
Active Contributor
0 Kudos

Not sure on your comments  "It's impossible with MASS".  Did you try before posting here?  It is very much possible.  If you are not sure, just search SCN or Google so that you will find how this can be achieved.

G. Lakshmipathi

antonio_bruno
Participant
0 Kudos

Hi,

I need to update the reason of rejection with different value for different quotation's positions.

The source file have the following structure:

VBAK-VBELN (Quotation)     VBAP-POSNR     VBAP-ABGRU

20000100                                                   10                        21

20000100                                                   30                        22

I've tried with the following solutions:

  1. MASS, but doesn't work if one position is completed and it's difficult to reject the positions with different reason. In add, in relation of a list, it's difficult select specific positions of quotations. Than I must modify quotation by quotation
  2. LSMW that use batch input recordered in relation to MASS. It apparentely update the reason of rejection but at the end didn't save it.
  3. LSMW that use the batch input recordered in relation to the following procedure, works but i can insert only one reason for specific quotation:
    • VA22.
    • "Select all" the positions. In this case, I cancel the field POSNR from the source file.
    • Edit --> Fast change of... --> Reason of rejection
    • Save

Thanks for your help.

Regards.

Antonio

JL23
Active Contributor
0 Kudos

Do you think the people here will send you a ready to use LSMW or how shall your post be understood?

LSMW is workbench where you have to define the objects to your own needs, to your own source file structure. That is entirely your work. SCN has plenty documents to learn how such LSMW object is defined.

to your point 1 MASS "did not save"  - Wow, this is really a qualified information, we have now room to guess where you could easily answer it yourself by looking into your system as SAP is actually talking with you, using error messages or writing a log which can be directly accessed from the final step in MASS

to 2.  you need to analyze first and omit all the closed positions. you have to do the same with  MASS and LSMW otherwise you get the same issues