Application Development 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: 

MIGO Exit -- get the serial number

Former Member
0 Kudos

Hello, everyone

When push the Enter button or save button in MIGO,I'd like to get the serial number using exit.

But I think that it is impossible to get the serial number in MIGO Exit.

Because, they are not IMPORT Parameter which can get serial number.

Anyone knows if we can get the serial number in MIGO Exit?

Soma

4 REPLIES 4

Former Member
0 Kudos

Hello

I found how to get the serial number.

It can use 'IQSM0008'.

Soma

0 Kudos

Hi,

Now an struck with the same problem...can i know the procedure how u have used the enhancement 'IQSM0008'

to get the serial numbers.

Thanks & regards.

anusha.

Former Member

Hi,

Even I have a similar requirement to get the value of serial number in runtime in MIGO tcode, I searched and dint find any FM or BAPI to fetch it. So I used the following code.

*field-symbols declarations

    field-symbols: <it_goserial>       type STANDARD TABLE,

                   <wa_goserial>       type any,

                   <lv_searial_number> type any.

*for retreiving the serial number

            ASSIGN ('(SAPLMIGO)OREF_DETAIL->T_GOSERIAL') TO <it_goserial>.

            if sy-subrc = 0.

*Get the serial numbers entered

              READ TABLE <it_goserial> INDEX 1 ASSIGNING <wa_goserial>.

              if sy-subrc = 0.

*serial number is the second component of the wa_goserial structure (cannot use the component name 'serialno' b/c the component is NOT defined in the Data Dictionary - it's defined in program LMIGOKE1)

                ASSIGN COMPONENT 2 OF STRUCTURE <wa_goserial> TO <lv_searial_number>.

endif.

endif.

<lv_searial_number> contains the derial number value at runtime.

former_member771140
Discoverer
0 Kudos

Hello Everyone,

I also faced some type of requirements where I had to update the equipment owner during Good Receipt / Issue.
I had followed the way described above( to get it from the stack variable ):-

ASSIGN ('(SAPLMIGO)OREF_DETAIL->T_GOSERIAL') TO <it_goserial>.

But, at the same time, there was a scenario, Vendor Exchange,

Exchange during the repair at the vendor where the un-serviceable Part kept by vendor and a replacement has been provided (i.e, new material with different serial number).

In that case, there were two lines during GR. And we need to consider the new line (with a specific movement type) to get that equipment updated.

When "(SAPLMIGO)OREF_DETAIL->T_GOSERIAL" was used, I never got the new material/serial line there and unable to update the equipment.

So, this variable from memory stack was used:-

"(SAPLIPW1)XOBJK_ALL[]" . Here you will get all the lines with the equipment numbers/object numbers for the equipment , serial numbers and corresponding materials too. It might be helpful while you have to do any manipulation on the serials / equipment's.

Code Snippet Example:-

FIELD-SYMBOLS: <lfs_objnr_all> TYPE ripw0_t.

ASSIGN ('(SAPLIPW1)XOBJK_ALL[]') TO <lfs_objnr_all>.

IF <lfs_objnr_all> IS ASSIGNED.

***Do your manipulation. You will get the serial number based on the materials on material document item line table(xmseg/mseg).

ENDIF.

Thanks,

Trisha