This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to use RFC_READ_TABLE BAPI function in Quick Connect for SAP 2.2?

I need to read custom tables created in a SAP HR system, I read the QC SAP 2.2 Quick Start Guide and found that there is a BAPI Function for the Quick Connect SAP solution. Is there any documentation that explains how to configure/use this RFC_READ_TABLE BAPI?

  • Hi Hector

    Which Table do you need ? Mabye we've something done already.


    Reto

  • There are custom made tables in SAP, around 20, that we need to read, they contain Person and Master data so they are actually data views built from different SAP tables, so the questions is how to read them, I have a list of tables with field names and data types, but have no clue on how to read them, also, I understand QC does not to deltas correct? so if a record changes in one table, I would need logic to figure out if it was an update?

    What is the best practice for this type of integration/reading of SAP custom tables in QC?

    Thank you.

  • This has been solved (thanks Reto), basically for a table named ZTHR_IAMORGUNIT with 4 fields, the entry in SAPMetaData.xml is the following. Now, this is something I tested and worked, and it might be wrong or not the correct way to do it as there is no documentation for this. Hope it helps out.

    <sapType name="SAP HR Org Unit">

        <operations>

            <operation name="Get" enumerator="GetOrgUnits">

              <attributes>

         <attribute name="Id" displayName="Organisational Unit">

                  <attributeBinding bindingType="outerParameter" sourceCall="GetOrgUnits2" bindTo="OrgUnit_Token1"/>

                </attribute>

                <attribute name="Country">

                  <attributeBinding bindingType="outerParameter" sourceCall="GetOrgUnits2" bindTo="OrgUnit_Token0"/>

                </attribute>

                <attribute name="Burks" displayName="Company Code">

                  <attributeBinding bindingType="outerParameter" sourceCall="GetOrgUnits2" bindTo="OrgUnit_Token2"/>

                </attribute>

                <attribute name="Name" displayName="Name of Org Unit">

                  <attributeBinding bindingType="outerParameter" sourceCall="GetOrgUnits2" bindTo="OrgUnit_Token3"/>

                </attribute>

              </attributes>

          <calls>

            <call name="GetOrgUnits" callType="complex">

             <inputParameters>

                    <inputParameter name="dummy">

                      <parameterBinding bindingType="value" bindTo="dummy"/>

                    </inputParameter>

                  </inputParameters>

      <outputParameters>

                    <outputParameter name="OrgUnits">

                      <parameterBinding bindingType="outerParameter" sourceCall="GetOrgUnit_DATA" bindTo="DATA"/>

                    </outputParameter>

                  </outputParameters>

                  <calls>

                    <call name="GetOrgUnit_DATA" nativeName="RFC_READ_TABLE" callType="bapi">

                      <inputParameters>

                        <inputParameter name="QUERY_TABLE">

                          <parameterBinding bindingType="value" bindTo="ZTHR_IAMORGUNIT"/>

                        </inputParameter>

                        <inputParameter name="DELIMITER">

                          <parameterBinding bindingType="value" bindTo=";"/>

                        </inputParameter>

                        <inputParameter name="NO_DATA">

                          <parameterBinding bindingType="value" bindTo=""/>

                        </inputParameter>

                        <inputParameter name="ROWSKIPS">

                          <parameterBinding bindingType="value" bindTo="0"/>

                        </inputParameter>

                        <inputParameter name="ROWCOUNT">

                          <parameterBinding bindingType="value" bindTo="0"/>

                        </inputParameter>

      <inputParameter name="OPTIONS" type="table">

                        </inputParameter>

                        <inputParameter name="FIELDS" type="table">

                          <parameterBinding field="FIELDNAME" bindingType="value" bindTo="COUNTRY"/>

      <parameterBinding field="FIELDNAME" bindingType="value" bindTo="ORG_UNIT"/>

                            <parameterBinding field="FIELDNAME" bindingType="value" bindTo="BUKRS"/>

      <parameterBinding field="FIELDNAME" bindingType="value" bindTo="NAMEOFORGUNIT"/>

                        </inputParameter>

                      </inputParameters>

                      <outputParameters>

                        <outputParameter name="DATA" type="table">

                        </outputParameter>

                      </outputParameters>

                    </call>

                  </calls>

                </call>

                <call name="GetOrgUnits2" callType="complex">

                  <inputParameters>

                    <inputParameter name="Input">

                      <parameterBinding bindingType="outerParameter" sourceCall="GetOrgUnits" bindTo="OrgUnits.WA"/>

                    </inputParameter>

                  </inputParameters>

                  <outputParameters>

                    <outputParameter name="OrgUnit_Token0">

                      <parameterBinding bindingType="outerParameter" sourceCall="GetOrgUnits" bindTo="OrgUnits.WA"/>

                      <dataHelper helperType="parseStringResult" delimeter=";" position="3"/>

                    </outputParameter>

                    <outputParameter name="OrgUnit_Token1">

                      <parameterBinding bindingType="outerParameter" sourceCall="GetOrgUnits" bindTo="OrgUnits.WA"/>

                      <dataHelper helperType="parseStringResult" delimeter=";" position="2"/>

                    </outputParameter>

      <outputParameter name="OrgUnit_Token2">

                      <parameterBinding bindingType="outerParameter" sourceCall="GetOrgUnits" bindTo="OrgUnits.WA"/>

                      <dataHelper helperType="parseStringResult" delimeter=";" position="1"/>

                    </outputParameter>

                    <outputParameter name="OrgUnit_Token3">

                      <parameterBinding bindingType="outerParameter" sourceCall="GetOrgUnits" bindTo="OrgUnits.WA"/>

                      <dataHelper helperType="parseStringResult" delimeter=";" position="0"/>

                    </outputParameter>

                  </outputParameters>

                </call>

    </calls>

            </operation>

        </operations>

    </sapType>

  • Now I've got to write back to some other custom tables, anybody have worked on this?

  • Hi Hector,

    I am going to post something similar...but did you ever figure out how to write back to custom table? Thanks!

    Keno