cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member210541
Active Participant
0 Kudos

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.

Answers (2)

Answers (2)

thanga_prakash
Active Contributor
0 Kudos

Hello Leon,

Try using the below methods.

EXPORT p1 = var1 TO MEMORY ID 'MEMID'.

IMPORT p1 = var2 FROM MEMORY ID 'MEMID'.

Regards,

Thanga

Former Member
0 Kudos

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.