<?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: Program on Document Flow in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-on-document-flow/m-p/1842551#M357896</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, do you want to throw the dialog which you see in VA02 for document flow, or do you just want the data from the database directly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you just want to throw the dialog that you see in VA02, you can do something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001.

data: xvbco6 type vbco6.
data: xvbak type vbak.


parameters: p_vbeln type vbak-vbeln.

clear xvbco6. clear xvbak.

select single * from vbak into xvbak
             where vbeln = p_vbeln.

move-corresponding xvbak to xvbco6.

call dialog 'RV_DOCUMENT_FLOW'
     exporting
          vbco6  from xvbco6
          ivkorg from xvbak-vkorg
          ivtweg from xvbak-vtweg.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise, you will need to look at transparent table VBFA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Jan 2007 21:18:25 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2007-01-24T21:18:25Z</dc:date>
    <item>
      <title>Program on Document Flow</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-on-document-flow/m-p/1842550#M357895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Floks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need a solution for this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Write a small program which shows the the document flow given a Sales order no.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rewards would be given for quick responses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Nanda&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 21:14:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-on-document-flow/m-p/1842550#M357895</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-24T21:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Program on Document Flow</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-on-document-flow/m-p/1842551#M357896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, do you want to throw the dialog which you see in VA02 for document flow, or do you just want the data from the database directly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you just want to throw the dialog that you see in VA02, you can do something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001.

data: xvbco6 type vbco6.
data: xvbak type vbak.


parameters: p_vbeln type vbak-vbeln.

clear xvbco6. clear xvbak.

select single * from vbak into xvbak
             where vbeln = p_vbeln.

move-corresponding xvbak to xvbco6.

call dialog 'RV_DOCUMENT_FLOW'
     exporting
          vbco6  from xvbco6
          ivkorg from xvbak-vkorg
          ivtweg from xvbak-vtweg.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise, you will need to look at transparent table VBFA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 21:18:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-on-document-flow/m-p/1842551#M357896</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-01-24T21:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: Program on Document Flow</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-on-document-flow/m-p/1842552#M357897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use Table VBFA to get the document flow of a particular Sales Order. Following Code will give you a list of documents for a particular sales order. Here, field VBTYP_N determines whether it is another Sales Order or a Delivery or a Quotation etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF x_vbfa,&lt;/P&gt;&lt;P&gt;          vbeln   TYPE vbeln_von,&lt;/P&gt;&lt;P&gt;          vbtyp_n TYPE vbtyp_n,&lt;/P&gt;&lt;P&gt;        END   OF x_vbfa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : it_vbfa TYPE TABLE OF x_vbfa,&lt;/P&gt;&lt;P&gt;       x_vbfa  TYPE x_vbfa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT vbeln vbtyp_n&lt;/P&gt;&lt;P&gt;  FROM vbfa&lt;/P&gt;&lt;P&gt;  INTO TABLE it_vbfa&lt;/P&gt;&lt;P&gt;  WHERE vbelv = sales_order_no.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  LOOP AT it_vbfa INTO x_vbfa.&lt;/P&gt;&lt;P&gt;    WRITE : /x_vbfa-vbeln, 20 x_vbfa-vbtyp_n.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if the answer is helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mukul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 21:22:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-on-document-flow/m-p/1842552#M357897</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-24T21:22:22Z</dc:date>
    </item>
  </channel>
</rss>

