This website is not affiliated with, sponsored by, or approved by SAP AG.

Reporting Deliveries with Batch split

Development (ABAP Development WorkBench, ABAP/4 programming)

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

Reporting Deliveries with Batch split

Postby rpinxt » Tue Nov 08, 2016 6:44 am

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?
rpinxt
 
Posts: 146
Joined: Mon Jul 23, 2012 8:02 am

Re: Reporting Deliveries with Batch split

Postby rpinxt » Fri Dec 02, 2016 5:32 am

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).
rpinxt
 
Posts: 146
Joined: Mon Jul 23, 2012 8:02 am

Re: Reporting Deliveries with Batch split

Postby Gothmog » Mon Dec 05, 2016 5:30 am

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).
68 74 74 70 3a 2f 2f 74 69 6e 79 75 72 6c 2e 63 6f 6d 2f 62 64 6f 37 6d 77 67
Gothmog
 
Posts: 1941
Joined: Wed Sep 12, 2007 4:46 am
Location: Probably not home

Re: Reporting Deliveries with Batch split

Postby rpinxt » Mon Dec 05, 2016 9:19 am

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.
rpinxt
 
Posts: 146
Joined: Mon Jul 23, 2012 8:02 am

Re: Reporting Deliveries with Batch split

Postby Gothmog » Mon Dec 05, 2016 10:13 am

"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.
68 74 74 70 3a 2f 2f 74 69 6e 79 75 72 6c 2e 63 6f 6d 2f 62 64 6f 37 6d 77 67
Gothmog
 
Posts: 1941
Joined: Wed Sep 12, 2007 4:46 am
Location: Probably not home

Re: Reporting Deliveries with Batch split

Postby rpinxt » Tue Dec 06, 2016 9:01 am

Homerun again Gothmog!!

Concatenate with respecting the blanks gives me the key as "matnr-blanks-batchnr" :)
rpinxt
 
Posts: 146
Joined: Mon Jul 23, 2012 8:02 am


Return to ABAP

Who is online

Users browsing this forum: No registered users and 12 guests





loading...


This website is not affiliated with, sponsored by, or approved by SAP AG.