cancel
Showing results for 
Search instead for 
Did you mean: 

POWL for Credit Check in Business Package Internal Sales Representative

former_member184598
Participant
0 Kudos

Hi,

Need some Help!

We are into implementation of Business Package Internal Sales Representative (Provided as a separated role in Portal).

I have a requirement where I need to Add some functionality into standard Credit Check SAP Screen (Delivered via POWL).

For this Perticular screen,

1) Sold to Party IDs in Query result table appear as Links. On Click of these IDs (links), I need to open a new custom WD Component:

2) I have to add few new Columns to Query results.

I have identified following about this Query:

Query: O2C_LIST_CUSTOMERS_CCOCKPIT

Type: O2C_LIST_CUSTOMERS_COCKPIT

Feeder:CL_O2C_POWL_CUSTOMERS

Also, when I checked in SPRO, following BADI is also provided for this query:

BADI_FEEDER_CUSTOMERS of enhancement spot ES_BADI_O2C_POWL_FEEDER.

Looks to me that, for adding new Columns in the query results, Get_Objects method of this BAdi should be implemented.

I guess this kind of things can also be done in Feeder Class Enhancements.

How should I go about doing this stuff?

Thanks,

Saumil Jyotishi

Edited by: SaumilJ on Apr 5, 2011 12:02 PM

Accepted Solutions (1)

Accepted Solutions (1)

former_member184598
Participant
0 Kudos

Hi Thomas,

Thanks! We will try changing the Navigation.

BTW, for adding a new Column we have implemented getfieldCatalogue method of the BAdi.

Here we have appended a new Column to the field Catalogue but its not getting reflected in POWL Results table.

What could be the reason? Also, when I try to debug, the control is not coming in the fieldCatalogue method of class or BAdi.

In my BAdi, I am using following code:

method IF_BADI_O2C_POWL_FEEDER~GET_FIELD_CATALOG.

data: ls_fieldcat type powl_fieldcat_sty.

ls_fieldcat-colid = 'KLIMK'. "#EC NOTEXT

ls_fieldcat-header_by_ddic = abap_false.

ls_fieldcat-header = ' Total Credit limit' .

append ls_fieldcat to C_FieldCat.

endmethod.

C_FieldCat is the changing parameter of the BAdi.

Do I need to Implement GetObjectsDefinition, GetObjets and GetFieldCatalogue all to see the result?

Regards,

Saumil Jyotishi

Edited by: SaumilJ on Apr 7, 2011 1:47 PM

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

In addition to adding the fileld to the field catalog (which extends the fields shown by the ALV), you also need to extend the underlying data model. This is done in the method GET_OBJECT_DEFINITION.

Of course you might also need to extend GET_OBJECTS to make sure this additional field is selected (some feeders use select * into corresponding fields, so you might be covered already if this new field comes from the same table).

>Also, when I try to debug, the control is not coming in the fieldCatalogue method of class or BAdi.

POWL has a cache for the meta data so that all methods are not processed on each run. Clear the cache to force regeneration of the metadata (and sometimes the data itself). Also some POWL Feeder methods are called aschronously, complicating debugging. If in development system you might temporarily change the configuration of the POWL to be synchronous.

former_member184598
Participant
0 Kudos

Hi Thomas,

Thanks again for the grt help! and sorry for bugging you again and again!

I was able to add columns to POWL!

For the OBN, As you said earlier in the post "If you are using the Portal, then go into the portal and change the OBN targe for the objects called via navigation. You shouldn't need an enhancement or BADI in the feeder class to make this change. "

Could you please elaborate on this point more? I have to open a custom Web Dynpro Application on Click of the links (Customer IDs) in POWL Results table.

This is a newly developed WD Component and it has nothing to do with any Business Object in the Background.

How can I go about it?

Regards,

Saumil Jyotishi

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>Could you please elaborate on this point more?

This is really all done on the Portal side. I put the link to the online help in the previous posting. That's about all I could offer you. If you still aren't sure how to configure the navigation target for OBN or want to setup a new Business Object in the Portal, you should really ask those questions in the Portal forum.

former_member184598
Participant
0 Kudos

Hi Thomas,

I did pose a query in Portal Forum but meanwhile I was able to achive the same via updaing the Target component's iview's PCD Location in my BAdi in HandleAction method in Stucture e_portal_actions

I am trying to add a new Column in another POWL in the same Business Package.

I have added my column is GetFieldCatalogue,GetObjects Definition and GetObjects but in this case,

getObjects is getting called before other methods. Thus, getobject's code is getting executed before catalogue and underlying data model is updated

And thus its giving following runtime error:

Short text

Internal error: Invalid structure description.

Error analysis

When exporting the structure description, the structure

components overlapped. The error occured in the

description of the object "RESULTS".

Is it because of the Cache?

I am trying to clear the POWL Cache but am not getting exactly how?

Regards,

Saumil Jyotishi

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>I am trying to clear the POWL Cache but am not getting exactly how?

I suggest you have a look at the POWL WIKI page. It lists all the admin applications, including those to delete the cache:

http://wiki.sdn.sap.com/wiki/display/WDABAP/POWL

Damean
Active Contributor
0 Kudos

Hi

   We are attempting to add some additional fields into the Mass Customer POWL (Field: KNA1-KTOKD).  But does NOT seems to get pass the method   IF_BADI_O2C_POWL_FEEDER~GET_OBJECTS. 


  Regrettably, we also do NOT have a sample implementation code from SAP for this particular method. Could you be so kind as to provide a sample code on how this could be achieved.


Thanks in ahead.



Regards

Damean



Answers (2)

Answers (2)

former_member184598
Participant
0 Kudos

Hi Thomas. Thanks a lot for replying!

Let me describe you what I am trying to do here exactly.

Actually, while working on Requirement 1 (Opening a new action from a link), I came across getactions method of the feeder where I found the code where relevent standard action is handled. It goes like this:

CASE i_actionid.

  • Ehp4 enhancement: display customer

WHEN 'KUNNR' OR 'NAME'.

IF mv_ehp4_active = cl_ops_switch_check=>switch_active_true.

READ TABLE c_result_tab ASSIGNING <fs_result> casting INDEX I_ACTION_INDEX.

CALL METHOD CL_O2C_POWL_UTIL=>GET_PORTAL_ACTIONS_CUSTOMER

EXPORTING

IV_KUNNR = <fs_result>-kunnr

IV_SPART = <fs_result>-spart

IV_VTWEG = <fs_result>-vtweg

IV_VKORG = <fs_result>-vkorg

IMPORTING

ES_PORTAL_ACTIONS = e_portal_actions.

endif.

  • End of Ehp4 enhancement: display customer

Now, on these actions ('KUNNR' OR 'NAME'), Instead of a new standard application, I need to open a Custom WD Application (with parameter 'KUNNR').

I need to figure out how should I go about it?

I tried to enhance the feeder and create overwrite exit where I can write my code in this CASE statement (which seemed easiest to me at first go), but seems like after creating an exit I need to do a lot of stuff (a local class is created in exit where I need to define a lot of standard stuff). As of now, its not working for me

Also, I tried to Create the BADI Implementation which gets executed after this standard code (HandleAction method of this BADI), but this gets called after e_portal_actions get populated

how to open my custom WD(Instead of standard) Application from here ?

I can create the URL for my application with WDY_CONSTRUCT_URL, but how to open this in a new window on Portal?

I have seen in some threads about using OBN. If its required, how should I use it in this case?

For Requirement 2 (Adding new Columns in POWL Results), I am planning to define and add new columns in getfieldcatalogue and getobjects method of the same badi.

Is it the right approach?

Regards,

Saumil Jyotishi

Edited by: SaumilJ on Apr 6, 2011 3:03 PM

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

POWL uses OBN for navigation. The whole point of OBN is that you don't have to change the code to change the target of the navigation. If you are using the Portal, then go into the portal and change the OBN targe for the objects called via navigation. You shouldn't need an enhancement or BADI in the feeder class to make this change.

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/5c/7392047a7546a7882dbba3e5f4744d/frameset.htm

>I am planning to define and add new columns in getfieldcatalogue and getobjects method of the same badi.

That sounds correct.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Your definintely on the right track. The Feeder class is key. That is where the field catalog is built, the data selection is performed and all event handling is done. So generally you would use BADIs in the feeder class (if present) and class based enhancements or source code enhancements to extend with the functionality you wish to add. I think a general study of how Feeder Classes work within POWL will help you to see where in the class you need to make your changes. I'm not sure from your inquiry how much more information you are seeking.