Skip to Content
avatar image
Former Member

ABAP Get local variable from other method(Get release code)

Hi ABAPer,

  I got a request need to get the release code and based on it to check PO price, how can I get the code in ME29N when user click in dialog? I have debug program is event trigger method "METHOD hotspot_click" in program LMERELVICI1. I also try to use the field symbol to get it and failed. Can you please let me know how to get the code in other program?  I would like develop the implicit enhancement in program MM06EF0S_STRATEGIE_CEKKO. I think the program routing is SAPLMEGUI->SAPLMERELVI->SAPLMEPO->SAPLMEGUI

DATA: IM_CODE TYPE FRGCO.

FIELD-SYMBOLS : <IM_CODE> TYPE ANY.

ASSIGN ('(SAPLMERELVI)MY_TMP_REL_CODE') TO <IM_CODE>.

IF <IM_CODE> IS ASSIGNED.

  IM_CODE = <IM_CODE>.

ENDIF.

Thanks,

Leon

PIC1.JPG (20.6 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Oct 27, 2015 at 09:45 AM

    first create an implicit in program LMERELVITOP and declare a variable there, i.e g_rel_code.

    create an implicit in method HOTSPOT_CLICK  and pass the value of  my_tmp_rel_code / ls_data-rel_code to the new declared variable.

    now you can access the variable through (SAPLMERELVI)G_REL_CODE in your programs.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 26, 2015 at 11:46 AM

    Hi,

    Check the BADI ME_PROCESS_PO_CUST and Method PROCESS_HEADER.

    Use.

      DATA: ls_mepohead TYPE mepoheader. 

    ls_mepohead = im_header->get_data( ).

    check the data in ls_mepohead.

    Hope this helps.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 27, 2015 at 09:12 AM

    Hello Leon,

    Try using the below methods.

    EXPORT p1 = var1 TO MEMORY ID 'MEMID'.

    IMPORT p1 = var2 FROM MEMORY ID 'MEMID'.

    Regards,

    Thanga

    Add comment
    10|10000 characters needed characters exceeded