Page 1 of 1

Reporting Deliveries with Batch split

PostPosted: Tue Nov 08, 2016 6:44 am
by rpinxt
So how would you get these unique values from LIPS table?
Say you have 1 line item that gets split into 2 batches.

Then LIPS has 3 lines.
1 main line with the main line item number (in this case 000040) and 2 lines with a 900001 and 900002 number.
Whenever I try to reference to this delivery in a report it will take the first line 000040.
For instance if I want to get the correct corresponding batch numbers I will get an empty field because in 000040 it is empty.
The batch numbers are on the lower levels.

Now I found the HigherLeverlItemBatch field.
However then I am only able to bypass the main line.
Because the value in the 90000x lines is 40, so then again I have no unique identifier....

What would be the solution?

Re: Reporting Deliveries with Batch split

PostPosted: Fri Dec 02, 2016 5:32 am
by rpinxt
Maybe I should clarify more.

I want to use table INOB to find an internal object number.
For that this table needs an object.

The object is material number and batch number.
However the field length is 25 and material numbers should be to the left and batch number totally to the right.....

So yes there will always be some blanks needed between them.
Batch number I think is always a fixed length however material number is not...meaning the number of blanks is also not.

Hence my problem fetching the internal object number of this table.
When in SAP I put material number * batchnumber it works.
So I tried concatenating it into a key, but that did not work in the abap code.
Als using an % instead of * did not work.

Any ideas how to get the internal object number from INOB.
I need it to pass it to table AUSP because I want the manuafacturing plant of a material batch combination.

All other (automated) solutions seem not to work (function modules for instance).

Re: Reporting Deliveries with Batch split

PostPosted: Mon Dec 05, 2016 5:30 am
by Gothmog
You're looking for entries in INOB for batches ? Depend on if the batch is cross-plant (table MCH1), plant-specific (MCHA), etc...
The field OBJEK will be the key of the batch table (disregarding field MANDT).
For table MCHA, the material number is on the 18 first characters of INOB-OBJEK, followed by the plant (4 characters) and the batch (10 characters).
For table MCH1, the material number is on the 18 first characters of INOB-OBJEK, followed by the batch (10 characters).

Re: Reporting Deliveries with Batch split

PostPosted: Mon Dec 05, 2016 9:19 am
by rpinxt
Well the only key that fits for me is the material number, empty cells and then the batchnumber.
Total length must be 25. The table the output then gives is MCH1

So using materialnumber and batch concatenated as one will not work.

Re: Reporting Deliveries with Batch split

PostPosted: Mon Dec 05, 2016 10:13 am
by Gothmog
"Total length must be 25" => means your batch numbers are 7 characters long, I guess.
Either use
Code: Select all
CONCATENATE matnr charg INTO objek RESPECTING BLANKS.

or
Code: Select all
objek(18) = matnr.
objek+18 = charg.

Re: Reporting Deliveries with Batch split

PostPosted: Tue Dec 06, 2016 9:01 am
by rpinxt
Homerun again Gothmog!!

Concatenate with respecting the blanks gives me the key as "matnr-blanks-batchnr" :)