Application Development and Automation 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: 
Read only

export import and set parameter and get parameter not working between badi

Former Member
0 Likes
2,778

hi

my requirement is to export the value from BADI and import that value in the enhancement point .

i have method POST_DOCUMENT in the BADI MB_MIGO_BADI . in this method im exporting my value .the following is the syntax .

l_val1 = <fs_mseg>-yy_cert .

SET PARAMETER ID 'yycert' FIELD l_val1.

from here the value is correctly exported . i got sy-subrc as zero .

after this point there is one function module MB_POST_DOCUMENT which is triggered in update mode . in this FM i have created one enhancement point implementation and i trying to import the value in this enhancement implementation.The following is the synrtax used.

data:l_val2(30) type c .

GET PARAMETER ID 'yycert' FIELD l_val2.

but here im getting sy-subrc as zero after get parameter statement .

i have tried all the available syntax . i have also tried using export and import statements .

but still im not able to import the value into my enhancement implementation .

could anybody plz tell me wht is the problem

thanks in advance

pavan

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,564

Hi Matt,

Can you please let me know why my post has been rejected ?

The thread what i suggested has the following comments:

"I just wanted to add something how I solved a similar problem in a different way, transferring data from the current session into the update task:

- Right, using memory-ID's are of no use when you want to pick up some data within the update task module

- Right, using the application buffer is somewhat restricted to the current application server

When possible, I have called another function module IN UPDATE TASK, exporting the data that I would like to have in the update task for later usage.

That function module then performs the EXPORT TO MEMORY.

As this is executed within the update task, the memory will be available later for the exits or Badis.

Prerequesite is, that the call to the export-to-memory-FM is registered before the function modules for the update task, so it may vary from the application you're implementing. "

Was the above not relevant to the query that was asked ? Please let me know if you think otherwise.

Regards

Kannaiah Kavuri

hi

my requirement is to export the value from BADI and import that value in the enhancement point .

i have method POST_DOCUMENT in the BADI MB_MIGO_BADI . in this method im exporting my value .the following is the syntax .

l_val1 = <fs_mseg>-yy_cert .

SET PARAMETER ID 'yycert' FIELD l_val1.

from here the value is correctly exported . i got sy-subrc as zero .

after this point there is one function module MB_POST_DOCUMENT which is triggered in update mode . in this FM i have created one enhancement point implementation and i trying to import the value in this enhancement implementation.The following is the synrtax used.

data:l_val2(30) type c .

GET PARAMETER ID 'yycert' FIELD l_val2.

but here im getting sy-subrc as zero after get parameter statement .

i have tried all the available syntax . i have also tried using export and import statements .

but still im not able to import the value into my enhancement implementation .

could anybody plz tell me wht is the problem

thanks in advance

pavan

3 REPLIES 3
Read only

Former Member
0 Likes
1,564

This message was moderated.

Read only

0 Likes
1,564

Hello Matt,

It is not irrelevant post. It exactly works fine for the above scenerio.

I can add some more explanation to that post.

Just create a temporary FM ZEXPORT_MEMORY as below.

FUNCTION ZEXPORT_MEMORY.
*"----------------------------------------------------------------------
*"*"Update Function Module:
*"
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(I_MATNR) TYPE  MATNR
*"----------------------------------------------------------------------

SET PARAMETER ID 'ABCD' FIELD i_matnr. 
" i_matnr is the field which is going to be exported

ENDFUNCTION.

And call the ZEXPORT_MEMORY inside the BADi or Exit as below.

CALL FUNCTION 'ZEXPORT_MEMORY'  IN UPDATE TASK
  EXPORTING
    i_matnr       = '1234'.

And inside the update FM MB_POST_DOCUMENT, get the memory value. Since the memory is updated during update task, it will be visible inside update FM.

DATA: lv_matnr TYPE matnr.

GET PARAMETER ID 'ABCD' FIELD lv_matnr.

Read only

Former Member
0 Likes
1,565

Hi Matt,

Can you please let me know why my post has been rejected ?

The thread what i suggested has the following comments:

"I just wanted to add something how I solved a similar problem in a different way, transferring data from the current session into the update task:

- Right, using memory-ID's are of no use when you want to pick up some data within the update task module

- Right, using the application buffer is somewhat restricted to the current application server

When possible, I have called another function module IN UPDATE TASK, exporting the data that I would like to have in the update task for later usage.

That function module then performs the EXPORT TO MEMORY.

As this is executed within the update task, the memory will be available later for the exits or Badis.

Prerequesite is, that the call to the export-to-memory-FM is registered before the function modules for the update task, so it may vary from the application you're implementing. "

Was the above not relevant to the query that was asked ? Please let me know if you think otherwise.

Regards

Kannaiah Kavuri