cancel
Showing results for 
Search instead for 
Did you mean: 

Create a PO by excel upload and Open PO by clicking on a Link .

Former Member
0 Kudos

Hi All ,

I want to build a custom web dynpro application in SRM 7.0 which will enable user to upload an excel file and PO will be created in system. Once the PO is created , the PO number will be displayed to the user as a link .

On clicking the Link the PO should be opened directly .

for example :

When we do a search for POs in the system , the list of PO is diaplayed and each PO is a link .

How can we achieve this ? Has anyone done this before ?

Regards,

Ambar Patil .

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Check this:

1. XLS upload - /people/subramanian.venkateswaran2/blog/2006/10/02/enhanced-file-upload--uploading-and-processing-excel-sheets

2. When you have data in ABAP, use BAPI BAPI_POEC_CREATE to create a PO (eg. )

3. When PO is created return PO ID to dynpro

Regards,

Marcin

Former Member
0 Kudos

Hey ,

Reading File and creating PO is fine . The major doubt is How to display that number as link and how to open that PO when that link is clicked.

Regards,

Ambar patil.

Former Member
0 Kudos

Hi,

You can use the code from POWL for PO.

Look in class /SAPSRM/CL_CLL_PWL_A_PO and method IF_POWL_FEEDER~HANDLE_ACTION.

In line 373 you have something like this:


   CASE i_actionid.

************************************************************************
*    Link: Object ID                                                   *
************************************************************************
      WHEN /sapsrm/if_cll_powl_c=>gc_fieldcat_object_id.
        ls_portal_actions-bo_system       = mv_srm_system_alias. "SAP_SRM
        ls_portal_actions-bo_name         = /sapsrm/if_cll_powl_c=>gc_obn_bo_po. "po
        ls_portal_actions-bo_op_name      = /sapsrm/if_cll_powl_c=>gc_obn_op_display. "display
        ls_portal_actions-bo_resolve_mode = /sapsrm/if_cll_powl_c=>gc_obn_bo_resolve_mode . "SOURCE_ROLE

        READ TABLE c_result_tab ASSIGNING <fs_result> INDEX  i_action_index.

        ls_namevalue-key                  = /sapsrm/if_cll_powl_c=>gc_obn_key_boid. "sapsrm_boid
        ls_namevalue-value                = <fs_result>-guid. "GUID of PO
        APPEND ls_namevalue               TO lt_namevalues.

        ls_portal_actions-parameters      = lt_namevalues.
        e_portal_actions                  = ls_portal_actions.

and at the end of the method


* use base method for general buttons ( Button 'Refresh')

  CALL METHOD super->if_powl_feeder~handle_action
    EXPORTING
      i_username                 = i_username "your username
      i_applid                   = i_applid "SAPSRM_OP_PURCHASING
      i_type                     = i_type "SAPSRM_FEEDER_PO
      i_actionid                 = lv_actionid "OBJECT_ID
      i_changed                  = i_changed 
      i_action_index             = i_action_index
      i_action_conf              = i_action_conf
      i_langu                    = i_langu
      i_additional_data          = <fs_data>
    IMPORTING
      e_portal_actions           = e_portal_actions
      e_messages                 = e_messages
      e_do_refresh               = e_do_refresh
      e_result_lines_changed     = e_result_lines_changed
      e_changes_processed        = e_changes_processed
      e_selected_changed         = e_selected_changed
      e_actions_changed          = e_actions_changed
    CHANGING
      c_selected                 = c_selected
      c_result_tab               = c_result_tab
      c_action_defs              = c_action_defs
      c_first_visible_row        = c_first_visible_row
      c_first_visible_scroll_col = c_first_visible_scroll_col.

This code opens PO in new window. Drill down in debug mode of this method "CALL METHOD super->if_powl_feeder~handle_action". Maybe there is a simplest way to achieve this...

Regards,

Marcin

Former Member
0 Kudos

I will surely look into this and get back to you . Can you give me the name of the WD component and the corresponding view ?

But I think , since I am going for an entirely custom Web Dynpro component I will also have to look into the Context nodes and the WDDOINIT and WDDOMODIFY of the POWL thing that you suggested .

Isnt it ?

Regards,

Ambar Patil.

Edited by: Ambar Patil on May 9, 2011 11:13 AM