cancel
Showing results for 
Search instead for 
Did you mean: 

QM: auto assignment of serial numbers to posting type during usage decision QA11

0 Kudos

Hi,

I have issue.

1. 100 serials was receipt and Ilot was created

2. Part of serial was taken to samples destroyed and arichive

Everything is written in Z table and i EXIT to US posting I make proposal for:

- samples destroyed to cost center - 5 PCE

- samples reserve - 5 PCE

- unrestricted - 90 PCE

Now system sends me window to enter serials for each type of posting.

I want to do it automatically from Z table without window.

Best regards

Wojtek

Accepted Solutions (0)

Answers (1)

Answers (1)

anand_rao3
Active Contributor
0 Kudos

I think you already have some custom logic in place which is storing the serial numbers proposal wise in some Z table. In standard, SAP system on its own can not decide which serial numbers are to be posted in which compartment. It is the user who decides it.

Try exploring in ABAP with exit QEVA0001 if you can pull the serial numbers from that Z table and give input to QA11 transaction code while making stock posting.

Could you please let us know why you have designed the separate Z table and what process benefit you are getting? Thanks!

Anand

0 Kudos

Hi,

Serial numbers are managed by external MES system during production.

SN labels are sticked on each PCE and write to this MES system. Then after packaging MES trigers GR in SAP with list od SN. In Z* table all SN's are written then with information of type of stock (normaln goods, samples destroyed, samples archive)

Production order consist all qty, but in fact, part of goods is taken to samples from production on-line, and goes to QM laboratory. Some of samples are destroyed, some not - according to information in Z* table.

All postings must be done by QP during usage decision, also according to this Z* table.

BR

Wojtek

anand_rao3
Active Contributor
0 Kudos

Ok! So you declare the production along with serial numbers in MES and then flow this information in to SAP. The Z table which you are talking about is maintained in which system? MES or SAP? If it is in SAP (and if the GR is done for the exactly the same serial numbers in SAP) then as I suggested earlier you have to set the UD process in background with ABAP help. Logic could be something like below,

  1. Select the inspection lot and run stock posting transaction say QA11 in background
  2. At the time of stock posting, check in Z table for, how much quantity is to be posted to Block, Unrestricted or Sample Usage.
  3. Give inputs accordingly to this program. It will then pop up the the window to input serial numbers
  4. Again go to Z table, pick the number from table specified as per the proposals and give these as input to QA11.

So it depends on the structure of your Z table how it is maintained. It must contain the same serial numbers that are present in inspection lot.

This whole fall on ABAP side to develop the program as the logic.

Anand

0 Kudos

Hi,

It is exactly what I've planed to do, but it is not so simple to perform

exit QEVA0001 works only for "Other quantity" - a can't use it.

Z* table exists in SAP

Procedure:

In exit QEVA0009

     1. select qty data from Z* to 3 types of stock (unrestricted, samples destroyed, samples reserved)

     2. enter code to provide copy o qty for stock types to postings i RQEVA


     ASSIGN ('(SAPMQEVA)RQEVA') TO <rqeva>.
           IF <rqeva> IS ASSIGNED.
             <rqeva>-vmenge01 = uu.          "Unrestricted
             <rqeva>-vmenge04 = yy.          "blocked

             <rqeva>-vmenge03 = zz.          "samples destroyed
             <rqeva>-vmenge05 = xx.          "samples reserve
             <rqeva>-vmenge06 = 0.           "nev material
             <rqeva>-zubuchmg_f = <rqeva>-zubuchmg_f - sum."to be posted
           ELSE.
             MESSAGE i001(zqm).
           ENDIF.


    3. During serial processing on "Postings" tab those qty are already assigned to proper stock types.

         In SAPLIPW1/MODULE (PBO)/AUSGABE_SERNR    I create ENHANCEMENT-point, and I           see there ale structures for all types of postings, but collect all data is very time consuming, and           could lead to incosistances.


Maybe there is another way to give to SAP information about serials for each type of stock postings in UD.


BE

Wojtek


anand_rao3
Active Contributor
0 Kudos

Yes you are right and I can understand that! You really have taken great efforts on this! I am not the ABAP expert but could you please try posting it individually rather than trying all the stock posting at the same time? Just my silly guess

I tried searching on SAP help portal to check if there is any KBA released by SAP for this scenario. Unfortunately I couldn't find anything on the topic.

Seems challenging. If we can find any BAPI that allows stock posting against inspection lot (with serial numbers) that would surely solve this problem. I am still searching and will get back to you as soon as I locate something.

Anand

0 Kudos

Hi, thanks for You help.

It is very rarely when I write post for search some help

From one hand it is easy to perform material movement with serial numbers

BAPI_GOODS_MOVEMENTS_CREATE suport it, but the problem is that it MUST be done via QA11, because after proper postings history display in QA13 is available.

When I'l find solution I will write it.

BR

Wojtek