cancel
Showing results for 
Search instead for 
Did you mean: 

MBO for BAPI_CUSTOMER_FIND - Setting values for load arguments

Former Member
0 Kudos

Hi

I am trying to create a MBO for the SAP BAPI BAPI_CUSTOMER_FIND. The requirement is to create a simple customer search application (Hybrid) using wildcards such that the user can search for example CH* and the app will display all customers with names starting with CH. I was able to create the MBO using drag and drop and selecting to create the MBO for attributes. When I test execution it works fine provided that i default some of the input parameters as seen below:

<?xml version="1.0" encoding="utf-8"?>
<Workflow xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="WorkflowClient.xsd" >
  <Globals>
    <DefaultScreens activation="" credentials=""/>
  </Globals>
  <Triggers>
    <Actions>
      <Action name="Customer_findAll" sourcescreen="" targetscreen="" errorscreen="" errorlogskey="ErrorLogs" errorlogmessagekey="ErrorLogMessage" errorlogmessageaslistkey="ErrorLogMessageAsList">
        <Methods>
          <Method name="findAll" type="search" mbo="Customer" package="CustomerLookupMBO:1.0" showCredScreenOnAuthFailure="true" >
            <InputBinding optype="none" opname="findAll" generateOld="false">
            </InputBinding>
            <OutputBinding generateOld="true">      
              <Mapping workflowKey="Customer" workflowType="list" mboType="list">
                 <Mapping workflowKey="Customer_COMP_CODE_attribKey" workflowType="text" attribName="COMP_CODE" mboType="string"/>
                 <Mapping workflowKey="Customer_TABNAME_attribKey" workflowType="text" attribName="TABNAME" mboType="string"/>
                 <Mapping workflowKey="Customer_FIELDNAME_attribKey" workflowType="text" attribName="FIELDNAME" mboType="string"/>
                 <Mapping workflowKey="Customer_FIELDVALUE_attribKey" workflowType="text" attribName="FIELDVALUE" mboType="string"/>
                 <Mapping workflowKey="Customer_CUSTOMER_attribKey" workflowType="text" attribName="CUSTOMER" mboType="string"/>
              </Mapping>

            </OutputBinding>
          </Method>
        </Methods>
      </Action>
    </Actions>
    <Notifications>
    </Notifications>
  </Triggers>
</Workflow>

Issue: The issue I am having is with the input parameters, more specifically the complex structure SELOPT_TAB. The other issue is when I generate the Hybrid code, the workflowclient.xml does not contain any input bindings. As a result, when i call this through the application, the BAPI does not return any results. I tried to use personalization parameters and mapped them through to the load arguments however the values that i have defined for the complex structure does not pull through to the backend. Am I missing something?

Thanks in Advance.

Kind Regards,

Thashin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Had to change the cache policy to online and map the field from the MBO to the load argument. Once this was done, the workflowclient.xml generated the correct input bindings.

Thanks

Thashin

Answers (1)

Answers (1)

DoanManhQuynh
Active Contributor
0 Kudos

Hi Thashin.

I were recomended that Mbo is not support for complex type input as structure or table. I tried to find solution too but have not success so I think you shoud change your input to a string parameter with separated sign (as "/"). I saw that in workspace, when you define a structure then you could define a personel parameter type of this structure...I haven't try yet so have no comment, you could give it a chance

Good luck.

midhun_vp
Active Contributor
0 Kudos

SUP will not support table as input in the MBO ( In the future release also ). From the given information I could found that you are trying to update data to SAP as a table input. It won't be supported.

- Midhun VP

DoanManhQuynh
Active Contributor
0 Kudos

Hi Midhun.

If you create an "operation" Mbo you can make table as input .I were tried.

midhun_vp
Active Contributor
0 Kudos

Quynh,

If that happens means it is a good solution. Again in the case of HWC it won't be supported I believe. Did you try that?.

Thanks

Midhun

DoanManhQuynh
Active Contributor
0 Kudos

i tried with native app and it work well. HWC i havent tried yet .