Application Development and Automation 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: 
Read only

create PR using LSMW(IDoc)

Former Member
0 Likes
661

Hello,

I'm trying to use LSMW(IDoc) to create a PR. However the PR number is internally assigned. Is there any way to make the program recognise that the PR has multiple line items using just LSMW(without a separate ABAP program).

Regards

Gladys

1 ACCEPTED SOLUTION
Read only

christian_wohlfahrt
Active Contributor
0 Likes
594

Hi Gladys!

You have two options:

- 1 file with two different line types; a header line and (several) position lines. They can be identified with a key word.

- 2 files with artificial key number as link

See for some more details.

Regards,

Christian

3 REPLIES 3
Read only

christian_wohlfahrt
Active Contributor
0 Likes
595

Hi Gladys!

You have two options:

- 1 file with two different line types; a header line and (several) position lines. They can be identified with a key word.

- 2 files with artificial key number as link

See for some more details.

Regards,

Christian

Read only

Former Member
0 Likes
594

Hi

There is no way in LSMW unless you have header records for segment E1PREQCR inserted into your file. The input file should have one line for this segment ( even though it may ne blank as it is optional ) and one or more line item lines after this.

If you already have a file with only item records you will have to insert the header lines at the desired place by another method or another ABAP program before passing it to LSMW. LSMW has capability of mapping / converting existing record lines but does not have the capability of adding lines.

Cheers

Read only

Former Member
0 Likes
594

Hi Christian and Sanjay,

Thanks for your replies. I've taken your advice and created two source structures using the unique key as the link, and it works now.

Btw. How do I close this topic?

Cheers

Gladys