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: 

Add specific serial numbers in ME_PROCESS_REQ_CUST

Former Member
0 Kudos

Hi,

I have a requierment to insert a specific serial number to a requisition in me51n/me52n in a certain event.

Im using the method PROCESS_ITEM in  ME_PROCESS_REQ_CUST badi,

there im using the set_serial_no method of the item reference, and have no success.

Can you help me find a way to this?

Thanks

Dudu L.

9 REPLIES 9

arivazhagan_sivasamy
Active Contributor
0 Kudos

Hi Dudu Lambererg,

Can you paste your code?

Do you want to change the standard PR number i-e which is coming from number range.

Arivazhagan S

0 Kudos

Hi Arivazhagan S,

Thank you for the fast response,

Im trying to assign a serial number for the item in the ME51N screen.

In the method IF_EX_ME_PROCESS_REQ_CUST~PROCESS_ITEM

There is a reference to the item (im_item).

This is my code:

DATA lt_serno TYPE mmpur_t_serno.

DATA ls_serno LIKE LINE OF lt_serno.

ls_serno-sernr = '123456'. (example)

APPEND ls_serno TO lt_serno.

im_item->set_serial_no(

     EXPORTING

          im_serial_numbers    = lt_serno

*         im_sn_call_from_gui =

*         im_sn_from_ref        =

*         im_sn_changed        =

*         im_sn_extend           =

*         im_sn_messages      =

     ).

The code executed successfully but there is no chage in the ME51N screen.

Dudu L.

0 Kudos

Hi Dudu Lambereg,

Can you try like below.

DATA: LS_PR1 TYPE MEREQ_ITEM.


LS_PR1 = IM_ITEM->GET_DATA( ).


LS_PR1-sernr = '123456'. (example)


IM_ITEM->SET_DATA( LS_PR1 ).


Arivazhagan S

0 Kudos

Hi,

I tried that and in also not working,

And acually i don't think it supposed to work because each requisition item can have many serial numbers according to the item's quantity, and the way you offered i can insert only one serial number.

Do you an idea for an other way to do that?

Thank you for your help!

Dudu L.

0 Kudos

Hi,

Can you add the screen shot of ME51, where exactly you want to show the serial numbers?

Rg, Kiran

0 Kudos

Hi Dudu,

you are right, actually, for a single PR, there may be more than 1 PO appears,

so if you are inserting only one serial no, it will not fulfill the standardisation.

So please change it accordingly.

0 Kudos

Is it informativ enough ?

Thank you!

0 Kudos

Hi,

i didn't understand what you mean.

Can you please past the code and i'll try it?

Thank you!

0 Kudos

Hi Dudu,

A little bit investigated, Since my PR is not configured with serial number! So I could not find the exact solution! However please debug the code below.

The serial number configuration is happening in include : LMEGUICJP.

in that two methods are available  and check the enhancement spots, I guess it will fulfil your requirement.

METHOD serno_assign.


CHECK l_serno_manager IS BOUND AND
           NOT my_item-sernp IS INITIAL.
     l_header = l_item->get_requisition( ).
     l_mereq_header = l_header->get_data( ).
     my_item = l_item->get_data( ).
     l_itemx = l_item->get_datax( ).

ENHANCEMENT-POINT EHP604_SERNO_ASSIGN_EBAN_01 SPOTS ES_SAPLMEGUI.

---------------
*     call pop-up
ENHANCEMENT-SECTION     EHP604_SERNO_ASSIGN_04 SPOTS ES_SAPLMEGUI.
       CALL FUNCTION 'SERIAL_LISTE_PR'

ENDMETHOD.



METHOD serno_list.


ENDMETHOD.


Since i can't able to debug due to the test dat, I think you can able to find the soltuion with in the two methods.