‎2007 Apr 18 4:27 AM
‎2007 Apr 18 4:39 AM
‎2007 Apr 18 4:30 AM
If u want to call another program from ur current program then we use submit
‎2007 Apr 18 4:32 AM
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
‎2007 Apr 18 4:39 AM
‎2007 Apr 18 4:46 AM
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.
‎2007 Apr 18 4:55 AM
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).
‎2007 Apr 18 4:54 AM
Hi ,
YOU SAID
LISTOBJECT = LISTTAB .
Is LISTTAB user defined inernal table or SAP Defined .
‎2007 May 21 8:57 AM
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.
‎2007 May 21 11:51 PM
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
‎2007 May 22 2:44 AM
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
‎2007 May 22 3:00 AM
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
‎2007 May 22 4:15 AM
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..
‎2007 May 22 4:40 AM
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
‎2007 May 22 4:44 AM
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..
‎2007 May 22 4:49 AM
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
‎2007 May 22 4:53 AM
With your suggestion, how can i insert the message?..
Thanks so much gareth!!