Skip to Content
author's profile photo Former Member
Former Member

user status change / update via action in transactions

Guru's

I'm wondering if the following scenario can be solved using standard CRM functionality.

Scenario:

I have created an action to print out a Smartform via a Selection Report (tcd: sppfp)

But what I also want, is that when the Smartform is actually printed that the user status of the Sales Order to which the print action belongs will be changed into another user status.

Can I use a method in the same action definition or do I have to create another action with a Method as processing method?

And which method can be used to do this?

Thanks for your help!!!

Regards,

Joost

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 12, 2007 at 12:59 PM

    Hi Joost,

    What can do is, in your action definition have two processing type:

    1. One will be for Printing the Smart form i.e. Smart Form print.

    2. Second will be Method call .

    Call the method which is an implementaion of the BADI EXEC_METHODCALL_PPF.

    In the implementation, for method Execute put in code

    method IF_EX_EXEC_METHODCALL_PPF~EXECUTE.

    Data: EV_HEADER_GUID TYPE CRMT_OBJECT_GUID.

    Data: IT_HEADER_GUID TYPE CRMT_OBJECT_GUID_TAB.

    RP_STATUS = 2.

    *Data: LS_HEADER_GUID TYPE CRMT_OBJECT_GUID.

    CALL FUNCTION 'CRM_INTLAY_GET_HEADER_GUID'

    IMPORTING

    EV_HEADER_GUID = EV_HEADER_GUID

    .

    CALL FUNCTION 'CRM_STATUS_CHANGE_EXTERN_OW'

    EXPORTING

    objnr = EV_HEADER_GUID

    user_status = '<b>E0006</b>'. '' this should be the status to be set. .

    CHECK SY-SUBRC EQ 0.

    RP_STATUS = 1.

    endmethod.

    This will perform two actions from one action definition.

    Wish the inforamtion is useful.

    Regards,

    Shalini Chauhan

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.