<?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: functionmodule in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/functionmodule/m-p/7563282#M1564626</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Srini for your reply.&lt;/P&gt;&lt;P&gt;i coded sobid insted of objid i.e sort lt_objects by plvar otype sobid.&lt;/P&gt;&lt;P&gt;                                                  delete adjacent duplicates from lt_objects comparing plvar otype sobid.&lt;/P&gt;&lt;P&gt;i am getting data.&lt;/P&gt;&lt;P&gt;here i have one more issue.while debaugging the FM HRHAP_PA_DOCUMENT_PREP_ORG&lt;/P&gt;&lt;P&gt;i am getting 20 records ,i mean while going into the above FM there are other FMs in backend which has a internal table which &lt;/P&gt;&lt;P&gt;contains 20 records.In those 20 records some records are duplicates.It is happening in standard FM.so could you please &lt;/P&gt;&lt;P&gt;provide me some codings to delete the duplicates entries of the standard FM.I could not find way to delete the duplicates&lt;/P&gt;&lt;P&gt;of standard FM.Please give me some codings.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Dec 2010 07:53:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-12-27T07:53:16Z</dc:date>
    <item>
      <title>functionmodule</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/functionmodule/m-p/7563280#M1564624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi abapers,&lt;/P&gt;&lt;P&gt;                   my requirement is in  HR module.i have to send appraisal templates to employees as per &lt;/P&gt;&lt;P&gt;                   organization number(pchobjid),template id(template),personnel area(werks),employeegroup(persg),&lt;/P&gt;&lt;P&gt;                   employee subgroup(persk).so i copird that standard report to zreport1 and add the select-options like pers area,&lt;/P&gt;&lt;P&gt;                   empl group,empl subgrp.my logic flow is:i getting positions and persons from hrp1001 table and pass the persons&lt;/P&gt;&lt;P&gt;                   pa0001 table to get the werks persg persk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                  i am passing the selection screen values in submit report.&lt;/P&gt;&lt;P&gt;                   the submit report is actualy giving the output in alv report.&lt;/P&gt;&lt;P&gt;                  i am using the standard report RHXHAP_APP_DOC_PREPARE.&lt;/P&gt;&lt;P&gt;                  my problem is in output i am getting all the 20 records along with the filtered values.&lt;/P&gt;&lt;P&gt;                 the function module given below is giving the alv output.&lt;/P&gt;&lt;P&gt;                CALL FUNCTION 'HRHAP_PA_DOCUMENT_PREP_ORG'&lt;/P&gt;&lt;P&gt;                EXPORTING&lt;/P&gt;&lt;P&gt;              plan_version        = pchplvar&lt;/P&gt;&lt;P&gt;             template_id         = template&lt;/P&gt;&lt;P&gt;             ap_start_date       = pchbegda&lt;/P&gt;&lt;P&gt;            ap_end_date         = pchendda&lt;/P&gt;&lt;P&gt;            t_org_units         = lt_objects&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      EXTRACT_M_N               = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            based_on_last_doc   = lastdoc&lt;/P&gt;&lt;P&gt;           skip_in_preparation = skipprep&lt;/P&gt;&lt;P&gt;           test_run            = test_run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my coding:&lt;/P&gt;&lt;P&gt;        loop at it_pa0001 INTO wa_pa0001 WHERE BEGDA le SY-DATUM&lt;/P&gt;&lt;P&gt;                                   AND   ENDDA ge sy-datum.&lt;/P&gt;&lt;P&gt;    pchbegda = wa_pa0001-begda.&lt;/P&gt;&lt;P&gt;    pchendda =  wa_pa0001-endda.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if pchplvar = '01' and pchbegda le sy-datum  and pchendda ge sy-datum.&lt;/P&gt;&lt;P&gt;     lw_object-plvar = pchplvar.&lt;/P&gt;&lt;P&gt;     lw_object-otype = pchotype.&lt;/P&gt;&lt;P&gt;     lw_object-sobid = objec-objid.&lt;/P&gt;&lt;P&gt;     APPEND lw_object TO lt_objects.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;IF  pchbegda le sy-datum AND pchendda ge sy-datum.&lt;/P&gt;&lt;P&gt;call function module'HRHAP_PA_DOCUMENT_PREP_ORG''&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   please give &lt;STRONG&gt;some codings&lt;/STRONG&gt; how to restrict the output of the function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message: please use more descriptive subject lines and code tags for your posts.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Thomas Zloch on Dec 23, 2010 4:21 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Dec 2010 15:11:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/functionmodule/m-p/7563280#M1564624</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-23T15:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: functionmodule</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/functionmodule/m-p/7563281#M1564625</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 think you are using LDB PCH in your program. Please look at the report RHHAP_PA_APP_DOC_PREPARE_ORG.&lt;/P&gt;&lt;P&gt;    While getting records from PA0001 filter using the conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select ... from pa0001 where pernr = &amp;lt;pernr&amp;gt; and
                                                    endda ge sy-datum and
                                                    begda le sy-datum and
                                                    werks in s_werks and 
                                                    persg in s_persg and 
                                                    persk in s_persk.

loop at it_pa0001 INTO wa_pa0001 WHERE BEGDA le SY-DATUM
                     AND ENDDA ge sy-datum.
   pchbegda = wa_pa0001-begda.
   pchendda = wa_pa0001-endda.

if pchplvar = '01' and pchbegda le sy-datum and pchendda ge sy-datum.

lw_object-plvar = pchplvar.
lw_object-otype = pchotype.
lw_object-sobid = objec-objid.
APPEND lw_object TO lt_objects.

endif.

endloop.

sort lt_objects by plvar otype objid.
delete adjacent duplicates from lt_objects comparing plvar otype objid.

end-of-selection.

  CALL FUNCTION 'HRHAP_PA_DOCUMENT_PREP_ORG'
    EXPORTING
        plan_version        = pchplvar
        template_id         = template
        ap_start_date       = pchbegda
        ap_end_date         = pchendda
        t_org_units         = lt_objects
.
.
.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srini.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Dec 2010 04:53:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/functionmodule/m-p/7563281#M1564625</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-24T04:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: functionmodule</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/functionmodule/m-p/7563282#M1564626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Srini for your reply.&lt;/P&gt;&lt;P&gt;i coded sobid insted of objid i.e sort lt_objects by plvar otype sobid.&lt;/P&gt;&lt;P&gt;                                                  delete adjacent duplicates from lt_objects comparing plvar otype sobid.&lt;/P&gt;&lt;P&gt;i am getting data.&lt;/P&gt;&lt;P&gt;here i have one more issue.while debaugging the FM HRHAP_PA_DOCUMENT_PREP_ORG&lt;/P&gt;&lt;P&gt;i am getting 20 records ,i mean while going into the above FM there are other FMs in backend which has a internal table which &lt;/P&gt;&lt;P&gt;contains 20 records.In those 20 records some records are duplicates.It is happening in standard FM.so could you please &lt;/P&gt;&lt;P&gt;provide me some codings to delete the duplicates entries of the standard FM.I could not find way to delete the duplicates&lt;/P&gt;&lt;P&gt;of standard FM.Please give me some codings.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Dec 2010 07:53:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/functionmodule/m-p/7563282#M1564626</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-27T07:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: functionmodule</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/functionmodule/m-p/7563283#M1564627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My issue is that how to delete the duplicate entries of standard Function module.&lt;/P&gt;&lt;P&gt;while debagging the standard FM HRHAP_PA_DOCUMENT_PREP_ORG,I am getting 20 records in Function modules&lt;/P&gt;&lt;P&gt;which are in back end.but i could not make any changes in standard Function modules.These 20 records have some&lt;/P&gt;&lt;P&gt;duplicate entries.i need to delete the duplicates from the standard function modules.&lt;/P&gt;&lt;P&gt;Please give me &lt;STRONG&gt;some codings&lt;/STRONG&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Dec 2010 11:45:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/functionmodule/m-p/7563283#M1564627</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-27T11:45:37Z</dc:date>
    </item>
  </channel>
</rss>

