<?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: calling perform from another Program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572175#M2008636</link>
    <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;c5e08e0478aa4727abc4482f5be390b2&lt;/SPAN&gt; &lt;BR /&gt;&lt;BR /&gt;Switzerland!&lt;BR /&gt;&lt;BR /&gt; &lt;SPAN class="mention-scrubbed"&gt;aboooood&lt;/SPAN&gt; You're welcome. It's always nice when people want to improve the way they code! &lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Jul 2022 09:55:34 GMT</pubDate>
    <dc:creator>matt</dc:creator>
    <dc:date>2022-07-20T09:55:34Z</dc:date>
    <item>
      <title>calling perform from another Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572150#M2008611</link>
      <description>&lt;P&gt;Hallo together, i have to call a Form from anotehr Report but Im having a Problem it wonts work. there is no syntax error.&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt; 
*Programm A
READ TABLE gt_out ASSIGNING FIELD-SYMBOL(&amp;lt;fs_gtout&amp;gt;) INDEX row.
    IF sy-subrc = 0 .

*Für die EBELN wird diese FUBA aufgerufen um den richtigen EBELN mit den richtigen position angezeigt wird
      CASE column.
        WHEN 'EBELN'.
          CHECK &amp;lt;fs_gtout&amp;gt;-ebeln IS NOT INITIAL AND &amp;lt;fs_gtout&amp;gt;-ebelp IS NOT INITIAL.
          CALL FUNCTION 'ME_DISPLAY_PURCHASE_DOCUMENT'
            EXPORTING
              i_ebeln        = &amp;lt;fs_gtout&amp;gt;-ebeln
              i_ebelp        = &amp;lt;fs_gtout&amp;gt;-ebelp
              i_display_only = abap_true
            EXCEPTIONS
              OTHERS         = 5.
          IF sy-subrc &amp;lt;&amp;gt; 0.
            MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 DISPLAY LIKE sy-msgty.
          ENDIF.
        WHEN 'MATNR'.
          CHECK &amp;lt;fs_gtout&amp;gt;-matnr IS NOT INITIAL.
          SET PARAMETER ID 'MAT' FIELD &amp;lt;fs_gtout&amp;gt;-matnr.
          CALL TRANSACTION 'ZDISPO' AND SKIP FIRST SCREEN.

        WHEN 'LIFNR'.
      CHECK &amp;lt;fs_gtout&amp;gt;-lifnr IS NOT INITIAL.
      SET PARAMETER ID 'LRE' FIELD &amp;lt;fs_gtout&amp;gt;-lifnr.
      PERFORM mk_03 IN PROGRAM b USING &amp;lt;fs_gtout&amp;gt;-lifnr.

      ENDCASE.
    ENDIF.

*Program b
FORM call_mk03 USING    l_lifnr.

  DATA BEGIN OF bdcdata OCCURS 100.
          INCLUDE STRUCTURE bdcdata.
  DATA END OF bdcdata.
  DATA BEGIN OF itab OCCURS 10.
          INCLUDE STRUCTURE bdcmsgcoll.
  DATA END OF itab.

  DATA: c_temp(10) TYPE c.

  SELECT SINGLE * FROM wyt3 WHERE lifnr = l_lifnr
                            AND   ekorg = '1000'.
  IF sy-subrc &amp;lt;&amp;gt; 0.
*    set parameter id 'LIF' field l_lifnr.
*    set parameter id 'EKO' field '1000'.
**    set parameter id '
*    call transaction 'MK03' and skip first screen.
* TODO Fehlermeldung
    SELECT SINGLE * FROM lfa1 WHERE lifnr = l_lifnr
                              AND   ktokk = 'REPA'.
    IF sy-subrc &amp;lt;&amp;gt; 0.
      EXIT.
    ENDIF.
  ENDIF.

  bdcdata-program  = 'SAPMF02K'.
  bdcdata-dynpro   = '0108'.
  bdcdata-dynbegin = 'X'.
  APPEND bdcdata.
  CLEAR bdcdata.

  bdcdata-fnam     = 'BDC_OKCODE'.
  bdcdata-fval     = '/00'.
  APPEND bdcdata.

  bdcdata-fnam     = 'BDC_CURSOR'.
  bdcdata-fval     = 'RF02K-LIFNR'.
  APPEND bdcdata.

  bdcdata-fnam     = 'RF02K-LIFNR'.
  bdcdata-fval     = l_lifnr.
  APPEND bdcdata.

  bdcdata-fnam     = 'RF02K-EKORG'.
  bdcdata-fval     = '1000'.
  APPEND bdcdata.

  bdcdata-fnam     = 'RF02K-D0110'.
  bdcdata-fval     = 'X'.
  APPEND bdcdata.

  bdcdata-fnam     = 'RF02K-D0120'.
  bdcdata-fval     = ''.
  APPEND bdcdata.

  bdcdata-fnam     = 'RF02K-D0130'.
  bdcdata-fval     = ''.
  APPEND bdcdata.

  bdcdata-fnam     = 'WRF02K-D0380'.
  bdcdata-fval     = 'X'.
  APPEND bdcdata.

  bdcdata-fnam     = 'RF02K-D0310'.
  bdcdata-fval     = 'X'.
  APPEND bdcdata.

  bdcdata-fnam     = 'WRF02K-D0320'.
  bdcdata-fval     = 'X'.
  APPEND bdcdata.


* Keine Fehler =&amp;gt; Transaktion kann ausgeführt werden
  CALL TRANSACTION 'MK03'  USING bdcdata  MODE 'E' MESSAGES INTO itab.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Jul 2022 08:29:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572150#M2008611</guid>
      <dc:creator>aboooood86</dc:creator>
      <dc:date>2022-07-19T08:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: calling perform from another Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572151#M2008612</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;PERFORM mk_03&lt;BR /&gt;vs&lt;BR /&gt;FORM call_mk03&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Jul 2022 08:56:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572151#M2008612</guid>
      <dc:creator>abo</dc:creator>
      <dc:date>2022-07-19T08:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: calling perform from another Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572152#M2008613</link>
      <description>&lt;P&gt;"hallo zusammen" does not neatly translate into English although I feel it should &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 08:57:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572152#M2008613</guid>
      <dc:creator>abo</dc:creator>
      <dc:date>2022-07-19T08:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: calling perform from another Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572153#M2008614</link>
      <description>&lt;P&gt;Hi Abood,&lt;/P&gt;&lt;P&gt;We need more information to provide any feedback. Its better if you can debug the program and see where the error is. What is the output of the program.Check if any data is selected or not. What is the sy-subrc value after call transaction. You need to check these things.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aditya.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 09:04:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572153#M2008614</guid>
      <dc:creator>former_member751463</dc:creator>
      <dc:date>2022-07-19T09:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: calling perform from another Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572154#M2008615</link>
      <description>&lt;P&gt;The "Hallo" was very bad u r right but the together should be acceptable somehow XD&lt;/P&gt;&lt;P&gt;lerning English from video games was not the best choice i guess XD&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 09:56:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572154#M2008615</guid>
      <dc:creator>aboooood86</dc:creator>
      <dc:date>2022-07-19T09:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: calling perform from another Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572155#M2008616</link>
      <description>&lt;P&gt;oh Im so sorry I feel really bad for this bad mistake :((&lt;/P&gt;&lt;P&gt;thx&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 10:01:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572155#M2008616</guid>
      <dc:creator>aboooood86</dc:creator>
      <dc:date>2022-07-19T10:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: calling perform from another Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572156#M2008617</link>
      <description>&lt;P&gt;no worries, I've lost count of the times I couldn't see this kind of mistakes in my code &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 10:10:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572156#M2008617</guid>
      <dc:creator>abo</dc:creator>
      <dc:date>2022-07-19T10:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: calling perform from another Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572157#M2008618</link>
      <description>&lt;P&gt;PS: although both programs can be activated, you should see a dump when the calling program actually attempts to run the PERFORM IN PROGRAM statement. To avoid it, if necessary, you may use the&lt;A href="https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapperform_form.htm#!ABAP_ALTERNATIVE_2@2@" target="_blank"&gt; "IF FOUND" extension&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 11:11:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572157#M2008618</guid>
      <dc:creator>abo</dc:creator>
      <dc:date>2022-07-19T11:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: calling perform from another Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572158#M2008619</link>
      <description>&lt;P&gt;thank u sir! i have one last quistion: &lt;/P&gt;&lt;P&gt;  PERFORM call_mk03 IN PROGRAM bCHANGING &amp;lt;fs_gtout&amp;gt;-lifnr IF FOUND.&lt;/P&gt;&lt;P&gt;  PERFORM call_mk03 IN PROGRAM b USING &amp;lt;fs_gtout&amp;gt;-lifnr IF FOUND.&lt;/P&gt;&lt;P&gt;whats the different between using and changing?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 13:55:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572158#M2008619</guid>
      <dc:creator>aboooood86</dc:creator>
      <dc:date>2022-07-19T13:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: calling perform from another Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572159#M2008620</link>
      <description>&lt;P&gt;Careful, do not abuse "IF FOUND": it is not intended as a catch-all, rather when you're deliberately planning a later development.&lt;/P&gt;&lt;P&gt;changing vs using is the same as with a normal (i.e., not "in program") &lt;A href="https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapperform_parameters.htm#!ABAP_ADDITION_3@3@" target="_blank"&gt;PERFORM call&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 14:33:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572159#M2008620</guid>
      <dc:creator>abo</dc:creator>
      <dc:date>2022-07-19T14:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: calling perform from another Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572160#M2008621</link>
      <description>&lt;P&gt;i thought IF FOUND is a must. i took it out of my Programm i will just use it fpr later planning develpment.&lt;/P&gt;&lt;P&gt;thank u again !&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 14:42:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572160#M2008621</guid>
      <dc:creator>aboooood86</dc:creator>
      <dc:date>2022-07-19T14:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: calling perform from another Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572161#M2008622</link>
      <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;c5e08e0478aa4727abc4482f5be390b2&lt;/SPAN&gt; &lt;BR /&gt;&lt;BR /&gt;Sure it does. "Hi everyone".&lt;BR /&gt;&lt;BR /&gt;I prefer the dialect. "Hoi zsamme". &lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 18:23:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572161#M2008622</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2022-07-19T18:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: calling perform from another Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572162#M2008623</link>
      <description>&lt;P&gt;PERFORM mk_03 IN PROGRAM b USING &amp;lt;fs_gtout&amp;gt;-lifnr.&lt;/P&gt;&lt;P&gt;is very bad programming. Do it differently. Seriously. This is 1990s programming.&lt;BR /&gt;&lt;BR /&gt; @ &lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt;  &lt;SPAN class="mention-scrubbed"&gt;bfeeb8ed7fa64a7d95efc21f74a8c135&lt;/SPAN&gt; &lt;BR /&gt;&lt;BR /&gt;I could weep.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 18:27:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572162#M2008623</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2022-07-19T18:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: calling perform from another Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572163#M2008624</link>
      <description>&lt;P&gt; &lt;SPAN class="mention-scrubbed"&gt;matthew.billingham&lt;/SPAN&gt; - Haha @ the weeping!!  A combination of BDC and 90s programming is bound to be a robust solution &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 18:39:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572163#M2008624</guid>
      <dc:creator>Ryan-Crosby</dc:creator>
      <dc:date>2022-07-19T18:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: calling perform from another Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572164#M2008625</link>
      <description>&lt;SPAN class="mention-scrubbed"&gt;matthew.billingham&lt;/SPAN&gt;&lt;P&gt; surely not with "together" &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 20:33:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572164#M2008625</guid>
      <dc:creator>abo</dc:creator>
      <dc:date>2022-07-19T20:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: calling perform from another Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572165#M2008626</link>
      <description>&lt;P&gt;Oh dear. That is all I can say.&lt;/P&gt;&lt;P&gt;Remote PERFORMS are an abomination. Even back in 1997 there were far, far, better ways of doing things. Then, as now, you should find a way to encapsulate re-usable code.&lt;/P&gt;&lt;P&gt;Why do people still program like this in 2022? I can only presume that is the way they were taught, and that is the way they will teach their successor to do things. Nobody ever questioning anything, no-one ever thinking there might be a better way.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 23:32:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572165#M2008626</guid>
      <dc:creator>hardyp180</dc:creator>
      <dc:date>2022-07-19T23:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: calling perform from another Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572166#M2008627</link>
      <description>&lt;SPAN class="mention-scrubbed"&gt;bfeeb8ed7fa64a7d95efc21f74a8c135&lt;/SPAN&gt;&lt;P&gt; "That's the way I've always done it" - a guarantee of never improving anything...&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2022 00:25:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572166#M2008627</guid>
      <dc:creator>Ryan-Crosby</dc:creator>
      <dc:date>2022-07-20T00:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: calling perform from another Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572167#M2008628</link>
      <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;matthew.billingham&lt;/SPAN&gt; so what is the modern programming?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2022 06:19:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572167#M2008628</guid>
      <dc:creator>aboooood86</dc:creator>
      <dc:date>2022-07-20T06:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: calling perform from another Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572168#M2008629</link>
      <description>&lt;SPAN class="mention-scrubbed"&gt;matthew.billingham&lt;/SPAN&gt;&lt;P&gt;Please don't get me in this kind of good/evil trap &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Of course, in my experience, I found out that ABAP Objects was much more maintainable than the old subroutines, provided that you code it well. But I also understand that people are in their learning curve (or don't want to learn), so I don't blame them. By the way, I often use PERFORM when I need to fix bugs of old-fashioned programs, but trying to add ABAP Objects as much as I can, if it helps in the code, so that to leave the program in better shape.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2022 06:33:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572168#M2008629</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-07-20T06:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: calling perform from another Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572169#M2008630</link>
      <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt; i try to use everything i learned and yes i need to focus more on abap oo but i thought working with PERFORM isnt that bad &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2022 06:41:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-perform-from-another-program/m-p/12572169#M2008630</guid>
      <dc:creator>aboooood86</dc:creator>
      <dc:date>2022-07-20T06:41:28Z</dc:date>
    </item>
  </channel>
</rss>

