cancel
Showing results for 
Search instead for 
Did you mean: 

BSP_WD_CMPWB Binding Context Node to Entity (in CRM UI, tcode SM_CRM)

robynhosby
Active Participant
0 Kudos
601

Hello Experts!

I have a question that I'm stuck on. I have posted same question in the SolMan section of the site.

In summary, I added a custom assignment block (a "form" table) using the AET (in tcode SM_CRM) in ChaRM transaction type ZMCR linked to BTAdminH. The new custom fields are editable and saveable using the standard AET generated logic.

Following the same steps, I created another custom assignment block (also a form table) for ChaRM transaction type ZMAD  - a Change Document, also linked to BTAdminH.  The standard AET generated logic does not allow edit or save.  To allow the new fields to be editable, I generated the setter and getter methods and changed method GET_I_field. That part works fine now. I still can't get values entered on new field to be saved.  Collection_wrapper->get_current is Initial.  How do I bind the context node to the entity?

I have tried a custom controller to try to bind it to BTAdminH. I have tried binding to the parent. Neither worked.  What am I missing? Researching on here, I'm finding several posts on the topic, but nothing that clearly details what is needed.  Is a custom controller needed? Where is additional code needed? Can anyone explain in detail what is needed to allow the new field to be saved? Thanks in advance for your help!

Robyn

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Robyn,

Is the entity getting created in ON_NEW_FOCUS method?

Regards,

Pratheek

samantak_chatterjee
Active Contributor
0 Kudos

Hi Robyn,

Can you put a break point in the method - DO_HANDLE_DATA of the view controller super class and check if the values which you are providing in the UI and traced back or not.

It's really a very strange behavior that in one transaction type the AET Code generation is working correctly while in the other it is imposing so many restrictions. Is there are any SAP Note in the SOL Man system ?

Unfortunately I don't have a SOL MAN system and can share you any code from a CRM System only. Let me know if you need any help in terms of technical input.

Hope this helps.

Best Regards,

Samantak.

robynhosby
Active Participant
0 Kudos

Hi Samantak,

Yes, it is strange. I think I'm missing something obvious, but no luck so far in finding my problem.

Yes, the value selected on the UI is being passed. I can see it in the SET_field method - parameter attribute_path has the field name and parameter value has the value selected on the UI.    My issue is that the iterator and the collection_wrapper are not bound, so I can't save the values. 

The standard AET generated logic worked great in the Change Request (also linked to BTAdminH), but not in the CD.  That is the only difference I've been able to see. The binding isn't standard in the CD. In researching ,I even tried to assign the same assignment block (component) that I use in the CR to the CD.  It does not work either. Meaning, the same component works in the CR but not in the CD. So , it sounds like the issue is outside of the component.   Any thoughts on what else I can check?

Thanks!

Robyn