<?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: Module pool question in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-question/m-p/2555655#M582405</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;write the code in th PAI of the screen to which u kept the PF_STATUS.&lt;/P&gt;&lt;P&gt;i.e, in MODULE USER_COMMAND_0200.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds,&lt;/P&gt;&lt;P&gt;bharat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Jul 2007 13:24:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-11T13:24:25Z</dc:date>
    <item>
      <title>Module pool question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-question/m-p/2555654#M582404</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;I have a module pool program, in that the initial screen contains 'Display Contents', when I click that the Custom table contents will be displayed&lt;/P&gt;&lt;P&gt;with a check box in the front for each record. In that screen I added the button 'Creat Credit Memo' on application tool bar in pf-status 'List'. Where should I write the code to create Credit Memo.&lt;/P&gt;&lt;P&gt;I have to create credit memo request for only checked records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Neelu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PROCESS BEFORE OUTPUT.
 MODULE STATUS_0100.
*
PROCESS AFTER INPUT.
 MODULE USER_COMMAND_0100.
--------------

MODULE USER_COMMAND_0100 INPUT.
  CASE OK_CODE.
    WHEN 'DISP'.
      CLEAR OK_CODE.
      CALL SCREEN 200.
----------------

PROCESS BEFORE OUTPUT.
* MODULE STATUS_0200.
MODULE PREPARE_LIST.
PROCESS AFTER INPUT.
* MODULE USER_COMMAND_0200.
--------------------------------

MODULE PREPARE_LIST OUTPUT.
  LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 100.
  PERFORM EDIT_LIST.
  LEAVE SCREEN.
ENDMODULE.                 " PREPARE_LIST  OUTPUT
------------------------------------

FORM EDIT_LIST.
 Data: chbox(1) type c value ' '.

  SET PF-STATUS 'LIST'.
  NEW-PAGE LINE-SIZE 158.
  SELECT * FROM ZPPPRICE.
    SELECT SINGLE NAME1 FROM KNA1 INTO KNA1-NAME1
                   WHERE KUNNR = ZPPPRICE-KUNNR.
    WRITE: /01 SY-VLINE,
            02 chbox as checkbox,
            04 SY-VLINE,
            05 ZPPPRICE-KUNNR,
            16 SY-VLINE,
            17 KNA1-NAME1,
            43 SY-VLINE,
            44 ZPPPRICE-MATNR,
            63 SY-VLINE,
            64 ZPPPRICE-CRDATE,
            75 SY-VLINE,
            76 ZPPPRICE-EFDATE,
            87 SY-VLINE,
            88 ZPPPRICE-SPRICE,
            104 SY-VLINE,
            105 ZPPPRICE-EPRICE,
            122 SY-VLINE,
            123 ZPPPRICE-EOHQTY,
            134 SY-VLINE,
            135 ZPPPRICE-AOHQTY,
            146 SY-VLINE,
            147 ZPPPRICE-CRMEMO,
            158 SY-VLINE.
  ENDSELECT.
  CLEAR ZPPPRICE.
  WRITE: /01(158) SY-ULINE.
ENDFORM.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 13:14:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-question/m-p/2555654#M582404</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-11T13:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: Module pool question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-question/m-p/2555655#M582405</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;write the code in th PAI of the screen to which u kept the PF_STATUS.&lt;/P&gt;&lt;P&gt;i.e, in MODULE USER_COMMAND_0200.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds,&lt;/P&gt;&lt;P&gt;bharat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 13:24:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-question/m-p/2555655#M582405</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-11T13:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: Module pool question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-question/m-p/2555656#M582406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi neelu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u should write code in pbo module of flow logic [ if u want to perform any validations for those records].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create a sub routine in flow logic of pbo module as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MODULE STATUS_0200.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;MODULE PREPARE_LIST.&lt;/P&gt;&lt;P&gt;Module checkorder. -&amp;gt; double click n write code for that module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if helpful reward some points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with regards,&lt;/P&gt;&lt;P&gt;Suresh.A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 13:25:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-question/m-p/2555656#M582406</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-11T13:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: Module pool question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-question/m-p/2555657#M582407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In USER_COMMAND_0200 loop over all checked records and create credit memo for each.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 13:26:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-question/m-p/2555657#M582407</guid>
      <dc:creator>che_eky</dc:creator>
      <dc:date>2007-07-11T13:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: Module pool question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-question/m-p/2555658#M582408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Neelu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my opinion this is not a nice design. You can achive the same result using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. A simple interactive report.&lt;/P&gt;&lt;P&gt;Where you will read the list outout using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;READ LINE INTN SY-LISEL INDEX SY-INDEX.&lt;/P&gt;&lt;P&gt;IF NOT SY-SUBRC IS INITIAL.&lt;/P&gt;&lt;P&gt; EXIT&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt; IF SY-LISEL+OFFSET(1) EQ 'X'.         " Your check box position on the screen.&lt;/P&gt;&lt;P&gt;*Check box is ticked.&lt;/P&gt;&lt;P&gt; ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. ALV grid where selected row will taken care by the standard ALV functionality.&lt;/P&gt;&lt;P&gt;   at use-commnand event of ALV grid insert your own code.&lt;/P&gt;&lt;P&gt;3. Module pool, instead of displaying the list, use a table control with multiple row selection. and  module use-command insert the code to create the credit memo.&lt;/P&gt;&lt;P&gt;Please refer any SAP standard help program starting with DEMO&lt;STRONG&gt;table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In you design you are mixing a list processing &amp;amp; module pool making it complex.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;A.Singh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Amarjit Singh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Amarjit Singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 13:39:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-question/m-p/2555658#M582408</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-11T13:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: Module pool question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-question/m-p/2555659#M582409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amarjit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really got confused but the solution you said looks simple. Are you saying that I can read the checked records and create Credit Memo using Alv Grid.&lt;/P&gt;&lt;P&gt;Where should I put the code mentioned by you, is it in PAI or PBO. Can I write the code to create Credit Memo in the loop IF SY-LISEL+OFFSET(1) EQ 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please tell be little bit clearly and also if you have any example program please send it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Veni.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 16:38:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-question/m-p/2555659#M582409</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-11T16:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: Module pool question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-question/m-p/2555660#M582410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your code:&lt;/P&gt;&lt;P&gt;WRITE CKBOX AS CHECKBOX INPUT ON. "To make input enable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please follow the demo report: DEMO_DYNPROS_AND_LISTS&lt;/P&gt;&lt;P&gt;I hope you are providing the button 'Create Credit memo' on the list output.&lt;/P&gt;&lt;P&gt;In your list report at the AT USER-COMMAND event.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;You insert the code.&lt;/P&gt;&lt;P&gt;1. First select all the ticked records.&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;   READ LINE INTO SY-LISEL INDEX SY-INDEX&lt;/P&gt;&lt;P&gt;   IF NOT sy-subrc IS INITIAL.&lt;/P&gt;&lt;P&gt;     EXIT.&lt;/P&gt;&lt;P&gt;   ELSE.&lt;/P&gt;&lt;P&gt;     IF SY-LISEL+OFFSET(1) EQ 'X'.&lt;/P&gt;&lt;P&gt;        CLEAR ITAB.&lt;/P&gt;&lt;P&gt;        ITAB-&amp;lt;FLD01&amp;gt;  =  SY-LISEL+OFFSET1(LEN1).&lt;/P&gt;&lt;P&gt;        ITAB-&amp;lt;FLD02&amp;gt;  =  SY-LISEL+OFFSET2(LEN2).&lt;/P&gt;&lt;P&gt;     ......................................................................&lt;/P&gt;&lt;P&gt;     ......................................................................&lt;/P&gt;&lt;P&gt;        APPEND ITAB.&lt;/P&gt;&lt;P&gt;     ENDIF.&lt;/P&gt;&lt;P&gt;   ENDIF.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Selected records loop to create the credit memo.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-------------------------" /&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;*&amp;lt;Your BDC/BAPI/FM etc to create creadit Memo&amp;gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&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;A.Singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2007 01:31:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-question/m-p/2555660#M582410</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-12T01:31:13Z</dc:date>
    </item>
  </channel>
</rss>

