cancel
Showing results for 
Search instead for 
Did you mean: 

Purchase Requisition Batch Input by LSMW - RM06BBI0

0 Kudos

   Hello,

          I am creating a Batch Input for PR and i got into a problem.

          I am doing many different PRs creation and they can have different Account Assignments. Some are linked to WBS, others PM Orders,others Cost Centers and some have no Account Assignment.

          Now i have been the past 3 hours trying to make LSMW understand that i got 5 account assingment fields (one for PM order, other for WBS, other for Network diagram, one for operation, and one for Cost Center) and i want only one of them being used. When i try to run it with blank data between commas (I use CSV file with comma as separator) it says:

Field EBKN-PS_PSP_PNR(1) (entries not allowed)

Field EBKN-AUFNR(1) (entries not allowed)

Field EBKN-NPLNR(1) (entries not allowed) (sorry translated those messages manually, i use SAP at another language)


So i would like to ask you experts, what can i do to make the system understand i only want one of these fields, the others are blank and not going to be used?



Thanks!!

Accepted Solutions (1)

Accepted Solutions (1)

JL23
Active Contributor
0 Kudos

Can you show the details of such record from the READ file and from the CONV file

0 Kudos

Here, both files attached.

PS: I am using BGR00-NODATA as '\'

JL23
Active Contributor
0 Kudos

Looks like your NODATA characters are drunken, in one file they are listed this way / and in the other  that way \

No, I did not mean such kind of text file when asking for details. You should click the lines in that view to get to the detail where one can see the value per field of the structure

0 Kudos

Hehe sorry ...

I printed the data at step 10

Will this help?

Message was edited by: Jeferson Giboski

JL23
Active Contributor
0 Kudos

Still drunken, a backslash is not a NODATA sign, hence you have values in those fields

0 Kudos

Changed to / and it worked hehe

Nvm then Thanks!!

Glad i at least did the rest right haha

Answers (2)

Answers (2)

Former Member
0 Kudos

This message was moderated.

0 Kudos

Hm just another thing.. i ran the lsmw but it seems to be creating one PR for each item... I had in mind it create 3 Itens for one PR.

Do you know what part could i be missing?

JL23
Active Contributor
0 Kudos

If you had just one yellow line then you would get 3 items into the requisition.

http://scn.sap.com/servlet/JiveServlet/download/16103072-450233/Conv%20File.jpg

0 Kudos

I mapped it like this.

Could you tell me what i did wrong? I identified each content and then did the same for the text file.

Thanks!

JL23
Active Contributor
0 Kudos

BEBA0 segment is the header, for each BEBA0 segment  you will get an extra PR.

the easiest way is to use 3 source files, one for BEBA0, the second for BEBAN the item, and the third for BEBKN the account assignement.

Then you need a an extra field with a value as identifier, this field should be present in all 3 files as the very first field. (so to speak the old PR requistion number)

Anything with the same number as identifier will automatically go to the same PR.

Whenever a new number in the identifier at BEBA0 segment is read you will get an new PR.

0 Kudos

Thanks i will try to do so!

You have been a great help!!

0 Kudos

Jurgen,

i got it how to link PR to the item, but how can i link the item with the account data?

I did it like:

PR

1;NB

Item

1;10;K;;1000080;MATERIAL TESTE;INVEST;100;1;UN;16072015;1001;CM01;DP11;320;test;BP01;;;P311

1;20;K;;1000080;MATERIAL TESTE;INVEST;100;1;UN;16072015;1001;CM01;DP11;320;test;BP01;;;P311

1;30;K;;1000080;MATERIAL TESTE;INVEST;100;1;UN;16072015;1001;CM01;DP11;320;test;BP01;;;P311

Accounting Data

1;/;/;/;/;51321

1;/;/;/;/;51321

1;/;/;/;/;51321

Its still giving me 3 lines.

JL23
Active Contributor
0 Kudos

to enable SAP to know which accounting data belongs to which PR item you have to add the item number to the accounting data.

0 Kudos

Do i have to map it as and identifying field too? I got one already (that enables me to check the header/item/account data).

Would the text file for items be like this?

I (item) ;10 (PR item); 1(account item)

and for account data

C(account); 10 (PR item); 1(account item)?

JL23
Active Contributor
0 Kudos

If you have separate sources for header/item/account data then you do not need an extra identifying field to know if it is header/item/account data, since this is already decided by the assignment of source structure to target structure and assignment of files to the source structure.

What you need is a common field(s) at the beginning of each file

at header it would be the PR number

at item it is the PR number and the item number

at account data it is PR number and item number

SAP joins header and item based on the PR number, and joins further to the account data based on the items PR number and item number, you need to make sure that those fields are equally named in the different source files.



If you have all three levels in one Excel tab, then of course you need to tell SAP which line has the header data and which line the item data and which one the account data. you would do this with an extra character H, I, A as identifier in the first field. I find it actually quite hard for a user to get the data into such structure in Excel. These identifiers are usually more needed if you get files from a system, like I mentioned in my blog


It is even possible using data as mentioned before in a single Excel tab and decide in the LSMW program when it becomes a new record, e.g. by using the statement "on_change_transfer_record" in the mapping rules. I explained that in


specific to your question:

Would the text file for items be like this?

I (item) ;10 (PR item); 1(account item)

and for account data

C(account); 10 (PR item); 1(account item)?


This is one field to less, you missed the old PR number field. Just imagine you have thousands of records  and not just 3.

How shall SAP know which records belong together.

If one person sorts your Excel file and saves it then you just have a mess and you will not find out which accounting data belong to which header and item

0 Kudos

Thanks! i was able to convert it and the system recognized the service .