on 01-15-2018 6:08 AM
Hi,
Requirement: Add the LFA1-KTOCK on BP vendor screen, this field is not available in MDG standard entity.
After done some enhancement, getting the error Data was not saved and have no clue on it now.
Appreciate if anyone have any idea on this and can assist.
Below is the related thread, but don't have the exact the solution yet.
https://archive.sap.com/discussions/thread/3655039#
Steps I have done:
1) Enhance the BP_VENGEN, add ZZKTOCK field
2) Update SMT mapping
a) SUPPL_BP_VENGEN_2API -> map ZZKTOCK -> KTOCK
b) SUPPL_BP_VENGEN_2STA -> MAP KTOCK -> ZZTOCK
3) KTOCK is set to hidden at the genil. In order to bring back the field in the UI design, enhance genil BUPA_CUS and implement new handler class. Redefine attribute GET_OBJECTS_PROPS and TYPE_ALTERNATIVE(different type) methods.
METHOD GET_OBJECTS_PROPS.
CALL METHOD super->if_genil_appl_model~get_object_props
RECEIVING
rt_obj_props = rt_obj_props.
READ TABLE rt_obj_props ASSIGNING FIELD-SYMBOL(<ls_obj_props>) WITH KEY object_name = 'SP_GeneralData'.
IF sy-subrc = 0.
READ TABLE <ls_obj_props>-attributes ASSIGNING FIELD-SYMBOL(<ls_attributes>) WITH KEY attribute_name = 'KTOCK'.
IF sy-subrc = 0.
<ls_attributes>-default_prop = 'N'.
ENDIF.
ENDIF.
ENDMETHOD.
METHOD TYPE_ALTERNATIVE.
CASE iv_absolute_name.
WHEN '\TYPE=Z_KTOCK_D'.
rv_absolute_name = '\TYPE=KTOCK'.
WHEN OTHERS.
rv_absolute_name = super->if_bs_typecasted_map_assistant~type_alternative( iv_absolute_name ).
ENDCASE.
ENDMETHOD.
4) Enhance UI to display KTOCK field.
Hi Ching,
Use the standard data element in for the custom attribute and it should work.
Thanks,
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rohit,
Thanks for the reply. It works now, seem like SAP standard logic requires the entity and the LFA1/genil have the same data element.
Just another quick question, is there a way there we can have different data element between entity and genil? I have performed the mapping at the handler class method TYPE_ALTERNATIVE, seem that does not work until I change to have the same data elements.
Thanks.
Hi Ching,
Having different data element for single attribute, I highly doubt that will work. Although there is an option provided by SAP in method TYPE_ALTERNATIVE. I still think MDG is not matured enough. In the backed CVI integration, if you look closely there are still lot of statements written which does MOVE-CORRESPONDING, even though the type is same but because the data element is different that is why the value is not retained in the standard structures.
We were having issues just because of this in MDG v7.0 & I still think that v9.1 is not different at all.
Cheers,
Rohit
Hi Rohit,
Actually I am using TYPE_ALTERNATIVE and but still getting the error. Only able to fix the error after update to use the same data elements. Btw, the current system I am investigating is version 9. Appreciate your assistance on this. Thanks
METHOD TYPE_ALTERNATIVE.
CASE iv_absolute_name.
WHEN '\TYPE=Z_KTOCK_D'.
rv_absolute_name = '\TYPE=KTOCK'.
WHEN OTHERS.
rv_absolute_name = super->if_bs_typecasted_map_assistant~type_alternative( iv_absolute_name ).
ENDCASE.
ENDMETHOD.
Hi Rohit, I implemented TYPE_ALTERNATIVE before use the same data element. And also assume it will work after implementing TYPE_ALTERNATIVE, however, seem like MDG requires both entity and Genil use the same data elements. Unless I have miss out something.
I have removed TYPE_ALTERNATIVE implementation now as no longer required anymore after update to use same data element.
Hi,
the field is disabled in the standard delivery since it does not make sense to use MDG for One-Time Vendor / Customer Accounts. Those accounts are used usually once. So where's the business reason to put those records under governance?
Best regards
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael,
Thanks for the reply.
Based on the data model, yes, this field KTOCK is not supported by MDG.
However, in the current design, the business might looking to have all the supplier under governance in MDG including one-time vendor. From technical point of view at this stage, we are studying the technical feasibility and getting the error which I mentioned above. Appreciate if you can share your view if you have any idea on the error message "Data was not saved".
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.