Skip to Content
0

LSMW for VA42 using direct Input Method- RVINVB10

Mar 02, 2017 at 07:36 PM

208

avatar image
Former Member

VA42 LSMW using Direct Input - RVINVB10

Hi ,

I am trying to update sales contract using LSMW direct input method. I am using program RVINVB10 in LSMW. But for some reason this program is considering it as create and not update. I am getting error which says object not in the allowed number range. When i debugged i understood it is becuase program is going for create option. Has any one used this program to update sales contract.

As a alternate solution I tried to do recording. For VA42 screen when I do recording, when i Open the document for edit by default the cursor is on the items table. It is only the first empty line on the item table. When i save this recording and try to rerun it again , this cursor statement is causing issue. Since the item number is hardcoded on it.

BDC_CURSOR RV45A-MABNR(04)

I dont find a way to avoid this from recording.

Can some one please help me on this?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Jelena Perfiljeva
Mar 02, 2017 at 09:39 PM
1

RVINVB10 has a documentation available. It does not say anything about updating existing documents. It clearly says "With this program, you can copy sales documents into the SAP system from external systems." This implies creating new documents.

It's rather unusual to use LSMW to update documents. It was meant mostly as a migration tool, to create some data.

What exactly are you trying to update and why?

P.S. "Change Sales Orders" is a tag for Fiori application, the right tag for this would be "Sales (SD)".

Show 5 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks Jelena for the response.

Yes, I read the documentation and understood it is meant for copy sales documents.

Our requirement is to change contract end date on line items for sales orders. We wanted to have an LSMW which can do this.

Since direct input was not supporting i went ahead with recording option. But facing below issue.

As a alternate solution I tried to do recording. For VA42 screen when I do recording, when i Open the document for edit by default the cursor is on the items table. It is only the first empty line on the item table. When i save this recording and try to rerun it again , this cursor statement is causing issue. Since the item number is hardcoded on it.

BDC_CURSOR RV45A-MABNR(04)

I dont find a way to avoid this from recording.

Are you aware of a better way to do this? Will change the tag to Sales.

Thanks, Ansari

0

Don't use BDC. There is BAPI_CUSTOMERCONTRACT_CHANGE available for the contract changes. It can be easily found in Google.

0
Former Member

Yes. That was correct if we are using an ABAP program. Cant we do it using LSMW?

With LSMW , i can not find a method to update contracts. Only option i can see is to create contracts.

Is this understanding correct?

0

Why do you have to do this with LSMW? As I said, it's simply a wrong tool for making changes. And it'll be obsolete in S/4HANA, from what I heard. It doesn't have options for changes because it's not meant to be used to change existing documents.

Sorry but I see no reason whatsoever why LSMW would have to be involved here.

1
Former Member

Thanks Jelena. I agree with you on this. Will close this thread.

0