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

Submit

Former Member
0 Likes
1,856

Hi ,

What is use of Submit statement ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,470

Hi ,

Can you explain the purpose of LIST_FROM_MEMORY.

15 REPLIES 15
Read only

Former Member
0 Likes
1,470

If u want to call another program from ur current program then we use submit

Read only

Former Member
0 Likes
1,470

Hi Kumar,

You use Submit to call an ABAP report from within another report. For example

submit 'ZREPORT1' using pernr = g_pernr

exporting list to memory

and return.

In this case we are submitting the report ZREPORT1, passing the parameter pernr a value of g_pernr (from the calling program) sending the output list to ABAP memory, and retruning to the calling program.

You can retrieve the list using the function module LIST_FROM_MEMORY.

Regards

Gareth

Read only

Former Member
0 Likes
1,471

Hi ,

Can you explain the purpose of LIST_FROM_MEMORY.

Read only

0 Likes
1,470

HI kumar,

Here is the example for SUBMIT statement

IN the statement Program RMCB0300 called with Ur local select-option parameters and Exported that result to Memory and returned to Source program ..

SUBMIT RMCB0300 WITH SL_WERKS-LOW EQ SO_WERKS-LOW

WITH SL_MATNR IN SO_MATNR

WITH VA EQ 'X'

WITH SL_SPMON-LOW EQ W_BUDAT1

WITH SL_SPMON-HIGH EQ W_BUDAT1

WITH SL_MTART-LOW EQ 'ROH'

WITH SLV_NO EQ 'STOCK'

EXPORTING LIST TO MEMORY AND RETURN.

Now funtion LIST_FROM_MEMORY is called to get the value from the memory

and stored in table LISTTAB

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

LISTOBJECT = LISTTAB

EXCEPTIONS

NOT_FOUND = 1

OTHERS = 2.

I hope U got some idea

Thanks

Shankar S

Award points if useful.

Read only

0 Likes
1,470

Hi Kumar,

It Retrieves a list from ABAP Memory exported using 'LIST_TO_MEMORY' or SUBMIT... EXPORTING LIST TO MEMORY and places it in the internal table LISTOBJECT.

The Internal Table LISTOBJECT is the Container to receive the list object (internal table with structure ABAPLIST).

Read only

Former Member
0 Likes
1,470

Hi ,

YOU SAID

LISTOBJECT = LISTTAB .

Is LISTTAB user defined inernal table or SAP Defined .

Read only

Former Member
0 Likes
1,470

Hi guys,

Can someone please tell me how to use SUBMIT for moving of message within a BADI?

The MOVE statement is not working well so someone adviced me to use SUBMIT instead, but I dont know how to use SUBMIT.

I hope someone can help me.Thank you.

Read only

0 Likes
1,470

Hi GI

Please give some more detail for this one. I cannot see why you would or could use a submit as an option to a simple move statement.

Regards

Gareth

Read only

0 Likes
1,470

Hi Gareth,

It is because the movement of message will be done in BADI, the simple MOVE statement is not working, so my someone ask me to use SUBMIT. And my friend ask me to use this code,

submit z2bc_mobile_message with p_msgid eq sy-msgid

with p_msgnr eq sy-msgno

with p_msgty eq sy-msgty

with p_msgv1 eq sy-msgv1

with p_msgv2 eq sy-msgv2

with p_msgv3 eq sy-msgv3

with p_msgv4 eq sy-msgv4

But i don't know how to incorporate these code to the program.

Thanks for the reply gareth..

Message was edited by:

gi

Read only

0 Likes
1,470

Hi GI

Your friend has given you almost everything you need. You paste the code into your BADI and substitute the P_ variables for the message detail you need:

For example, instead of:

message e091(pg)with 'An' 'Example' 'Here' 'for you'.

You would code:


*  Declaring Variables
data:  p_msgid like sy-msgid,
         p_msgnr like sy-msgno,
         p_msgty like sy-msgty,
         p_msgv1 like sy-msgv1,
         p_msgv2 like sy-msgv2,
         p_msgv3 like sy-msgv3,
         p_msgv4 like sy-msgv4.
*Populating Variables
p_msgid = 'PG'. 
p_msgnr = '091'.  
p_msgty = 'E'.  
p_msgv1 = 'An'. 
p_msgv2 = 'Example'. 
p_msgv3 = 'Here'.  
p_msgv4 = 'for you'.

* And submit the report
submit z2bc_mobile_message with p_msgid eq sy-msgid 
with p_msgnr eq p_msgno
with p_msgty eq p_msgty
with p_msgv1 eq p_msgv1
with p_msgv2 eq p_msgv2
with p_msgv3 eq p_msgv3
with p_msgv4 eq p_msgv4
  and return.
*  And return to get you back to you logic.

Regards

Gareth

Read only

0 Likes
1,470

But we have diffrent message depending on the condition.

Like for example,

if MTART NE 'UNBW'

This would be the message ' Pallet management is inactive for plant '.

T

here's another message to other condition.

How can I use submit here?

Thanks really for the reply..

Read only

0 Likes
1,470

Hi GI

Then all you have to do is set your variables in a CASE statement, and then call the submit statement. EG:

CASE MTART.

When 'UNBW'.

  • Set variables for message 'Pallet management is inactive for Plant'.

When others.

  • Set variables for other condition

ENDCASE.

Submit .....

Regards

Gareth

Read only

0 Likes
1,470

What if there should be a variable included in the message?How can I incorporate it with SUBMIT.

Like for this code:

MESSAGE i028(Z1WM) WITH wa_goitem-werks wa_goitem-lgort INTO g_message.

how can i change it with submit?

thanks so much for your reply gareth..

Read only

0 Likes
1,470

Hi GI,

In this case your call would be:


submit z2bc_mobile_message with p_msgid eq 'Z1WM' 
with p_msgnr eq '028'
with p_msgty eq 'I'
with p_msgv1 eq wa_goitem-werks 
with p_msgv2 eq wa_goitem-lgort
  and return.

Regards

Gareth

Read only

0 Likes
1,470

With your suggestion, how can i insert the message?..

Thanks so much gareth!!