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

calling billing and delivery transactions when i click the button in webdyn

Hi,

How to call the transactions like billing and delivery when i click the button.I am developing a webdynpro alv report in that 2 buttons are there.one is confirmation and another is cancel.

I want to call the billing transaction when i press the confirmation button?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Apr 02, 2008 at 02:29 PM

    Hi Lakshmi,

    It is not possible to directly call a transaction code from a wev application. Calling a transaction involves launching of SAP Dynpros which is not supported by WDA frame work.

    One possible ways is to use transactional iViews in Portal. We can Associate a transaction code to this and when called, it launches the same in an R/3 Screen.

    If you are using portal as a triggerring point of your web dynpro applications, then the below requirement is achieved by doing the following.

    1. Create a BDC report program to call transaction CAT2 skipping the first screen.

    2. The report has the same input parameters as that of the transaction CAT2.

    3. Associate a transaction to the report program sat 'ZCAT2'.

    In the event handler of the button in your web dynpro do that following

    Data declarations
    --------------------------------------------------------------------------------
    Local Internal tables(lt_)
    --------------------------------------------------------------------------------
     lt_bus_parameter_list TYPE wdy_key_value_table,
    lt_launcher_parameter_list TYPE wdy_key_value_table,
    
    --------------------------------------------------------------------------------
    
    Local Work area's(ls_)
    --------------------------------------------------------------------------------
     ls_keyvalue_pair TYPE wdy_key_value,
    
    --------------------------------------------------------------------------------
    
    Local Variables(l_)
    --------------------------------------------------------------------------------
     l_pcdpageurl TYPE string,
    l_componentcontroller TYPE REF TO if_wd_component,
    l_port_manager TYPE REF TO if_wd_portal_integration.
    
    
    --------------------------------------------------------------------------------
    
    Constants(c_)
    --------------------------------------------------------------------------------
     CONSTANTS:
    c_transaction_code TYPE string VALUE 'ZCAT2',
    c_okcode TYPE string VALUE 'F8',
    c_param1 TYPE string VALUE 'P_Data_Entry_Profile',
    c_param2 TYPE string VALUE 'P_person_number'.
    
    l_componentcontroller = wd_this->wd_get_api( ).
    l_port_manager = l_componentcontroller->get_portal_manager( ).
    
    Fill all the business parameters 
    
    CLEAR ls_keyvalue_pair.
    ls_keyvalue_pair-key = c_param1.
    ls_keyvalue_pair-value = 'Data Entry Profile'.
    APPEND ls_keyvalue_pair TO lt_bus_parameter_list .
    
    CLEAR ls_keyvalue_pair.
    ls_keyvalue_pair-key = c_param2.
    ls_keyvalue_pair-value = 'Person Number'.
    APPEND ls_keyvalue_pair TO lt_bus_parameter_list .
    
    
    Fill the launcher parameters for the transaction 
    CLEAR ls_keyvalue_pair.
    ls_keyvalue_pair-key = 'AutoStart'.
    ls_keyvalue_pair-value = 'Yes'.
    APPEND ls_keyvalue_pair TO lt_launcher_parameter_list.
    
    CLEAR ls_keyvalue_pair.
    ls_keyvalue_pair-key = 'GuiType'.
    ls_keyvalue_pair-value = 'WinGui'.
    APPEND ls_keyvalue_pair TO lt_launcher_parameter_list.
    
    CLEAR ls_keyvalue_pair.
    ls_keyvalue_pair-key = 'OkCode'.
    ls_keyvalue_pair-value = c_okcode.
    APPEND ls_keyvalue_pair TO lt_launcher_parameter_list.
    
    CLEAR ls_keyvalue_pair.
    ls_keyvalue_pair-key = 'System'.
    ls_keyvalue_pair-value = 'SAP_R3_HumanResources'.
    APPEND ls_keyvalue_pair TO lt_launcher_parameter_list.
    
    CLEAR ls_keyvalue_pair.
    ls_keyvalue_pair-key = 'TCode'.
    ls_keyvalue_pair-value = c_transaction_code.
    APPEND ls_keyvalue_pair TO lt_launcher_parameter_list.
    
    CLEAR ls_keyvalue_pair.
    ls_keyvalue_pair-key = 'Technique'.
    ls_keyvalue_pair-value = 'SSF'.
    APPEND ls_keyvalue_pair TO lt_launcher_parameter_list.
    
    CLEAR ls_keyvalue_pair.
    ls_keyvalue_pair-key = 'WinGui_Type'.
    ls_keyvalue_pair-value = 'Shortcut'.
    APPEND ls_keyvalue_pair TO lt_launcher_parameter_list.
    
    SAP has provided us with customizing table to maintain the path for the iView.Here Resource_key is the key field to get the path. 
    We create a new entry in this table using which we uniquely identify the path of the iVew that needs to be launched.
    
    
    
    get the url of the pcd page for the common transaction iView 
    SELECT SINGLE b~text
    INTO l_pcdpageurl
    FROM t7xssserstring AS b
    INNER JOIN t7xssserres AS a
    ON a~respcdpage = b~guid
    WHERE a~ressource = /rio/zcl_hse_constants=>c_common_resource.
    
    
    Navigate to the Injury Illness details 
    CALL METHOD l_port_manager->navigate_absolute
    EXPORTING
    navigation_target = l_pcdpageurl
    navigation_mode = l_port_manager->co_show_external
    use_sap_launcher = abap_true
    business_parameters = lt_bus_parameter_list
    launcher_parameters = lt_launcher_parameter_list.
    
    

    The folowing is the flow of the program:

    When user clicks a button to launch transaction CAT2, the event handler associated to it called.

    Here we populate an internal table with the parameters to call transaction ZCAT2 and the iView is launched by calling navigate_absolute method with the right path.

    I am not very much sure as to how the iViews are set up but there is a provision to read the key valure pair there. The values are read and the tranzation ZCAT2 is called which will inturn launch CAT2 transaction.

    By adding Skip First screen statement we can get in the details directly.

    Hope this helps.

    Regards,

    Sravan Varagani

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 01, 2008 at 05:28 PM

    Hi,

    You can accomplish this using Object Based Navigation concept. Well, create a Transactional IView and attach it to the respective Business Object's operation in portal. Check this link for more info.

    http://help.sap.com/saphelp_nw70/helpdata/en/e4/f86f4132f15c58e10000000a1550b0/frameset.htm

    Regards

    Raja Sekhar

    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.