I'm using this FM CRMXIF_PRODUCT_MATERIAL_SAVE to update the set types in CRM system.
However, inside this function, there is one more FM CRMXIF_SENDER_SITEID_GET which gets the site id of the sender.
Inside the FM CRMXIF_SENDER_SITEID_GET, i see one more FM ICF_IS_PLUGIN_SESSION which determines the context whether IDOC or SOAP.
When i'm using the FM CRMXIF_PRODUCT_MATERIAL_SAVE directly with some correct and valid data, the FM is not creating any customer set data in the set type.
However, when i check in debug mode and come to the FM ICF_IS_PLUGIN_SESSION, i can see that plugin_session is "N" and the context is "I " (IDOC). And when i change the context to "S" (SOAP), then I'M ABLE TO CREATE SET DATA IN THE CRM SET TYPE.
This FM is taking the below parameters:
IF sv_context IS INITIAL. CALL FUNCTION 'ICF_IS_PLUGIN_SESSION' IMPORTING plugin_session = lv_plugin_session. if lv_plugin_session = 'N'. sv_context = 'I'. "set context to IDOC sv_callmode = 'S'. "set callmode to synchron elseif lv_plugin_session = 'Y'. sv_context = 'S'. "set context to SOAP sv_callmode = 'S'. "set callmode to synchron else. sv_context = space. sv_callmode = space. endif. ENDIF.
I want the context to be set always as "S".
Could you please provide me some inputs over this? Why is it always the plugin session is "N" and the context set to "I"?