<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Read data from VBFA table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-vbfa-table/m-p/6258185#M1384596</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;WHEN Iam using this code it is showing type mismatch error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Oct 2009 06:18:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-10-20T06:18:03Z</dc:date>
    <item>
      <title>Read data from VBFA table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-vbfa-table/m-p/6258182#M1384593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi gurus;&lt;/P&gt;&lt;P&gt;     I want to read data from &lt;STRONG&gt;VBFA&lt;/STRONG&gt; table nd pass its &lt;STRONG&gt;VBELV&lt;/STRONG&gt; to &lt;STRONG&gt;VBAK&lt;/STRONG&gt; table to get &lt;STRONG&gt;VBAK&lt;/STRONG&gt; values, Iam using FM &lt;STRONG&gt;SD_DOCUMENT_FLOW_GET&lt;/STRONG&gt; ND &lt;STRONG&gt;RV_ORDER_FLOW_INFORMATION&lt;/STRONG&gt;, BUT i am not getting desire result. WHEN iam using FM &lt;STRONG&gt;SD_DOCUMENT_FLOW_GET&lt;/STRONG&gt;, it will give result only for last row of data, its not considering body part, so tell me how to used this FM properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data: l_docflow type tdt_docflow.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data lw_docflow type tds_docflow OCCURS 1 WITH HEADER LINE .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SELECT VBELN KNUMV BUKRS KUNRG REGIO NETWR FKSTO FKDAT FKART  INTO CORRESPONDING FIELDS OF TABLE T_VBRK&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;FROM VBRK WHERE BUKRS IN P_BUKRS AND FKDAT IN P_FKDAT AND VKORG IN P_VKORG AND REGIO = '07'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    &lt;STRONG&gt;ORDER BY VBELN KNUMV.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;SORT T_VBRK BY vbeln.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;LOOP AT T_VBRK.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    &lt;STRONG&gt;IF  T_VBRK-FKART = 'F2' OR T_VBRK-FKART = 'YF2' OR T_VBRK-FKART = 'ZF2' OR&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;        &lt;STRONG&gt;T_VBRK-FKART = 'ZG2' OR T_VBRK-FKART = 'ZL2' OR T_VBRK-FKART = 'YG2' OR T_VBRK-FKART = 'YL2' .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;IF T_VBRK-FKSTO IS INITIAL.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;STRONG&gt;CALL FUNCTION 'SD_DOCUMENT_FLOW_GET'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    IV_DOCNUM              = &lt;STRONG&gt;T_VBRK-vbelN&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IV_ITEMNUM             =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IV_ALL_ITEMS           =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IV_SELF_IF_EMPTY       = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   ET_DOCFLOW             = &lt;STRONG&gt;l_docflow&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  .&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOOP AT l_docflow INTO lw_docflow   .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;IF  lw_docflow-vbtyp_V = 'C' OR lw_docflow-vbtyp_V = 'K' OR lw_docflow-vbtyp_V = 'L' OR lw_docflow-vbtyp_V = 'E'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;T_VBFA-vbelv = lW_docflow-vbelv.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;T_VBFA-VBELN = lW_docflow-VBELN.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;T_VBFA-vbtyp_V = lW_docflow-vbtyp_V.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;APPEND t_vbfa.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;endif.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;endloop.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;ENDIF.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;endloop.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;loop at t_vbfa.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;if t_vbfa-vbtyp_V = 'C' OR t_vbfa-vbtyp_V = 'K' OR t_vbfa-vbtyp_V = 'L' OR t_vbfa-vbtyp_V = 'E' .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SELECT VBELN BSTNK BSTDK FROM VBAK INTO CORRESPONDING FIELDS OF TABLE T_VBAK FOR ALL ENTRIES IN T_VBFA&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;          &lt;STRONG&gt;WHERE VBELN = T_VBFA-VBELV .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;endif.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;ENDLOOP.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2009 05:33:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-vbfa-table/m-p/6258182#M1384593</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-20T05:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: Read data from VBFA table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-vbfa-table/m-p/6258183#M1384594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;When selecting the billing data from VBRK table also select POSNR(item no) from VBRP table by doing inner join.&lt;/P&gt;&lt;P&gt;Then pass VBELN and POSNR to the function module SD_DOCUMENT_FLOW_GET.&lt;/P&gt;&lt;P&gt;When appending internal table T_VBFA also append l_docflow-POSNN.&lt;/P&gt;&lt;P&gt;Then select data from VBAK AND VBAP table to header and item data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vinod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2009 05:52:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-vbfa-table/m-p/6258183#M1384594</guid>
      <dc:creator>rvinod1982</dc:creator>
      <dc:date>2009-10-20T05:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: Read data from VBFA table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-vbfa-table/m-p/6258184#M1384595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the below function module&lt;/P&gt;&lt;P&gt;RV_ORDER_FLOW_INFORMATION pass the type as C and pass the number.You will get all the flow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT VBELN KNUMV BUKRS KUNRG REGIO NETWR FKSTO FKDAT FKART  INTO CORRESPONDING FIELDS OF TABLE T_VBRK  FROM VBRK WHERE BUKRS IN P_BUKRS AND FKDAT IN P_FKDAT AND VKORG IN P_VKORG AND REGIO = '07'&lt;/P&gt;&lt;P&gt;    ORDER BY VBELN KNUMV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT T_VBRK BY vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;LOOP AT T_VBRK.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    IF  T_VBRK-FKART = 'F2' OR T_VBRK-FKART = 'YF2' OR T_VBRK-FKART = 'ZF2' OR&lt;/P&gt;&lt;P&gt;        T_VBRK-FKART = 'ZG2' OR T_VBRK-FKART = 'ZL2' OR T_VBRK-FKART = 'YG2' OR T_VBRK-FKART = 'YL2' .&lt;/P&gt;&lt;P&gt;      IF T_VBRK-FKSTO IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;i_vbco6-vbeln = t_vbrk-vbeln.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'RV_ORDER_FLOW_INFORMATION'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  AUFBEREITUNG        = '2'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  BELEGTYP            = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    &lt;STRONG&gt;COMWA               = i_vbco6&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NACHFOLGER          = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  N_STUFEN            = '50'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  VORGAENGER          = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  V_STUFEN            = '50'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  BELEGTYP_BACK       =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    &lt;STRONG&gt;VBFA_TAB            = t_vbfa&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   NO_VBFA             = 1&lt;/P&gt;&lt;P&gt;   NO_VBUK_FOUND       = 2&lt;/P&gt;&lt;P&gt;   OTHERS              = 3&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt; ENDIF.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;endloop.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;loop at t_vbfa.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  if t_vbfa-vbtyp_V = 'C' OR t_vbfa-vbtyp_V = 'K' OR t_vbfa-vbtyp_V = 'L' OR t_vbfa-vbtyp_V = 'E' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*clear t_vbfa.&lt;/P&gt;&lt;P&gt;SELECT VBELN BSTNK BSTDK FROM VBAK INTO CORRESPONDING FIELDS OF TABLE &lt;STRONG&gt;T_VBAK&lt;/STRONG&gt; FOR ALL ENTRIES IN &lt;STRONG&gt;T_VBFA&lt;/STRONG&gt; WHERE VBELN = T_VBFA-VBELV .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;ENDLOOP.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case of any more help is required do let me know&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nabheet Madan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2009 05:59:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-vbfa-table/m-p/6258184#M1384595</guid>
      <dc:creator>nabheetscn</dc:creator>
      <dc:date>2009-10-20T05:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Read data from VBFA table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-vbfa-table/m-p/6258185#M1384596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;WHEN Iam using this code it is showing type mismatch error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2009 06:18:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-vbfa-table/m-p/6258185#M1384596</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-20T06:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Read data from VBFA table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-vbfa-table/m-p/6258186#M1384597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you can do is where it is shwoing type mismatch error maniatain as the same type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You only need to pass the order number thats it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can test in se37 just pass the sales order number and let the other default value remain as it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will get the whole flow detail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know inc ase you need any help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please paste your code here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nabheet Madan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2009 06:22:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-vbfa-table/m-p/6258186#M1384597</guid>
      <dc:creator>nabheetscn</dc:creator>
      <dc:date>2009-10-20T06:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Read data from VBFA table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-vbfa-table/m-p/6258187#M1384598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi guru,&lt;/P&gt;&lt;P&gt;when i want to print &lt;STRONG&gt;bstnk nd bstdk&lt;/STRONG&gt; from &lt;STRONG&gt;vbak&lt;/STRONG&gt; table, it will print only last value. iam using below code, so what i will chnage in the code to get full values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; LOOP AT  T_VBRK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    READ TABLE T_VBFA  WITH KEY VBELN = T_VBRK-VBELN.&lt;/P&gt;&lt;P&gt;   READ TABLE T_KONV1 WITH KEY KNUMV = T_VBRK-KNUMV.&lt;/P&gt;&lt;P&gt;    READ TABLE T_VBAK WITH KEY VBELN = T_VBFA-VBELV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     MOVE-CORRESPONDING T_VBRK TO T_FINAL.&lt;/P&gt;&lt;P&gt;    MOVE-CORRESPONDING T_VBFA TO T_FINAL.&lt;/P&gt;&lt;P&gt;     MOVE-CORRESPONDING T_VBAK TO T_FINAL.&lt;/P&gt;&lt;P&gt;    MOVE-CORRESPONDING T_KONV1 TO T_FINAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T_FINAL-TOT = T_FINAL-KWERT + T_FINAL-Excise_duty + T_FINAL-Ecess + T_FINAL-HEcess .&lt;/P&gt;&lt;P&gt;    T_FINAL-GROSS = T_FINAL-TOT + T_FINAL-Sales_Tax.&lt;/P&gt;&lt;P&gt;    T_FINAL-KBETR = T_KONV-KBETR / 10.&lt;/P&gt;&lt;P&gt;    APPEND T_FINAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2009 09:11:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-from-vbfa-table/m-p/6258187#M1384598</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-21T09:11:27Z</dc:date>
    </item>
  </channel>
</rss>

