cancel
Showing results for 
Search instead for 
Did you mean: 

Txn: QM02: ABAP Debugging: Found 'swc_set_element'

Former Member
0 Kudos

Hi all,

My Client has asked to enhance the Transaction QM02 by adding some Notification Information in the <b>Action Box</b> especially Editable window that comes after clicking <i><b>Send Standard Email</b></i> .

In this Editable Window, we are able to enter some details that are to be sent to the recipent.

But my requirement is to put some details about the Notification in this Screen Automatically!!! (ie when SAP brings this Editable Window, it should contain some information about the Notification.)

So When I looked in the DEBUGGing, I found a FM (QM06_FM_TASK_SEND_PAPER_ATTACH) that handles the Email manangement.

After having a deep look, I found some statements such as

SWC_SET_ELEMENT

SWC_SET_TABLE .....

I am really not sure about these statement.

Question:

1. Could anybody help me out in exploring the details about these statements ???

2. What should I do to bring some predefined information in this Editable Screen automatically ??

Thanks

Kam

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

FM QM06_FM_TASK_SEND_PAPER_ATTACH

<<....

......

Name des Dokuments

swc_set_element container 'DOCUMENTNAME' text-201.

Dokumenttyp

swc_set_element container 'DOCUMENTTYPE' 'SCR'.

Dokumentinhalt

swc_set_table container 'DocumentContent' content.

Kennzeichen: kein Dialog

swc_set_element container 'NO_DIALOG' 'X'.

>>

Here content is an internal table :

Insert some code to populate 'content' itab with the text [ something like content-line = '* Hello' append content. ]

Do it before << swc_set_table container 'DocumentContent' content. >>

This will enable you to see the content 'Hello' in imediate sapscript editor but not in the subsequent message.

you can check this even in debuging mode ..

Please do some debugging, it should not be that difficult...

Cheers,

Ram

Former Member
0 Kudos

Ram,

Thanks for the details. I have solved my clients requirement.

And I have alloted the points for u!!!

Finally, I am planning to study this kind of programming from the scratch. Could you please advice me ???

Many Thanks

Kam

Former Member
0 Kudos

you can search for SAP Business Objects..

These are used in Workflows and for BAPIs purpose as well.

Just see one example [ e.g. my weblog ] and compare with the Business Object definition in Transaction SWO1.

There should be a lot better learning material available on help.sap.com or on SDN.....

Or else just search for "SAP Business Objects" in google & yahoo..I think you will get a few of my articles as well

Don't award 10 points if you don't like but Please close the thread

Cheers,

Ram

Former Member
0 Kudos

I am not able to check this Xn at the moment but my guess is that inside the FM , it will be using method Create of Business Object 'MESSAGE'.( Check the FM and also see the object type 'MESSAGE' using Xn SWO1 )

swc_set_element is to pass the single line parameters..like a variable ..to the method.

This stmt sets the parameter in container.

Like parameter - type of the message should be 'RAW'.

while the swc_set_table_....is used for setting multi-line parameters ( like itab - may be in this case the content of the message will be an ITAB).

you can copy the FM to a Z FM and then try this to call somehow ...may be within a user exit..

However, I am not sure if you would be able to display the text in mail-editor automatically.

But yes, you can probably set the whole /part of the message automatically ( without being able to show it to the user ).

You can check an example code on creating a message using MESSAGE.Create method in my weblog:

/people/rammanohar.tiwari/blog/2005/10/10/generic-object-services-gos--in-background

Cheers,

Ram

Message was edited by: Ram Manohar Tiwari

Former Member
0 Kudos

Ram,

Thanks for the details.

Please have a look at the txn QM02 with a valid Notification.

And give me some idea on how my requirement can be achieved!!!!

Thanks

Kam

Former Member
0 Kudos

Could anybody help me please at the earliest?????

Kam

Former Member
0 Kudos

Hi Kam,

The answer to your first question is rather easy, these are not statements but macro's. The basically store the data passed to these macro's to the workflow container.

Regards,

John.

Former Member
0 Kudos

John,

Thanks for answering the Question 1.

Is the Macro is similar in the functionality to FM ???

Thanks

Kam

Former Member
0 Kudos

Hi Kam,

You can find these macros in include <CNTN01>. You can find detailed information on these macros in:

http://help.sap.com/saphelp_erp2004/helpdata/en/c5/e4ad64453d11d189430000e829fbbd/frameset.htm

Please let me know if you need further help.

Regards,

John.

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Macros are a form of modularzation and reuseablity. They are simular to subroutines.

Regards,

Rich Heilman

Former Member
0 Kudos

Thanks Rich and John!!!!

Do anybody has any idea about my Question 2 ????

Many Thanks

Kam