<?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: Screen Variant - ME22N in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/screen-variant-me22n/m-p/6089616#M1358506</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create 2 screen variants ( 1 with GL Account in display mode and 2 with GL account with editable mode)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then write a program C &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
parameters : ebeln like ekpo-ebeln.

" Using the EBELN and find the BLART 

if blart eq 'ZAR1'.
call function 'RS_HDSYS_SET_SC_VARIANT'
     exporting
        progname = sy-repid
        scvariant = scvariant  " Call Variant 1
       overwrite_scvariant = 'X'.
else.
call function 'RS_HDSYS_SET_SC_VARIANT'
     exporting
        progname = sy-repid
        scvariant = scvariant  " Call Variant 2
       overwrite_scvariant = 'X'.
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and also check this link&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04s/helpdata/en/7d/f63a16015111d396480000e82de14a/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04s/helpdata/en/7d/f63a16015111d396480000e82de14a/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Aug 2009 18:42:46 GMT</pubDate>
    <dc:creator>former_member194669</dc:creator>
    <dc:date>2009-08-28T18:42:46Z</dc:date>
    <item>
      <title>Screen Variant - ME22N</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screen-variant-me22n/m-p/6089614#M1358504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have created a screen variant for ME22N where GL account is display only.  However, we only want this to be triggered when BLART = 'ZAR1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can we put this condition in?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can it be done in a BADI, Exit or even in SHD0?  If so, how?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2009 18:18:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screen-variant-me22n/m-p/6089614#M1358504</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-28T18:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Screen Variant - ME22N</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screen-variant-me22n/m-p/6089615#M1358505</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;  Create a custom variant transaction and use enhancement spots in PO program and use leave to transaction to call that transaction if EKKO-BLART suffices your condition.&lt;/P&gt;&lt;P&gt;Here you have to be careful to check the transaction if the current transaction is ME22N only then call the new Z-Transaction. I hope you got the idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Himanshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2009 18:36:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screen-variant-me22n/m-p/6089615#M1358505</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-28T18:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Screen Variant - ME22N</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screen-variant-me22n/m-p/6089616#M1358506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create 2 screen variants ( 1 with GL Account in display mode and 2 with GL account with editable mode)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then write a program C &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
parameters : ebeln like ekpo-ebeln.

" Using the EBELN and find the BLART 

if blart eq 'ZAR1'.
call function 'RS_HDSYS_SET_SC_VARIANT'
     exporting
        progname = sy-repid
        scvariant = scvariant  " Call Variant 1
       overwrite_scvariant = 'X'.
else.
call function 'RS_HDSYS_SET_SC_VARIANT'
     exporting
        progname = sy-repid
        scvariant = scvariant  " Call Variant 2
       overwrite_scvariant = 'X'.
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and also check this link&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04s/helpdata/en/7d/f63a16015111d396480000e82de14a/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04s/helpdata/en/7d/f63a16015111d396480000e82de14a/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2009 18:42:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screen-variant-me22n/m-p/6089616#M1358506</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-08-28T18:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Screen Variant - ME22N</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screen-variant-me22n/m-p/6089617#M1358507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's still not working for me. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm placing the code in here:&lt;/P&gt;&lt;P&gt;METHOD IF_EX_ME_PROCESS_PO_CUST~OPEN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It hits my code and I don't get any errors, but the Screen variant is not taking effect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  TYPES: BEGIN OF type_scvar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          tcvariant TYPE utcvariant,    "Transaction Variant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          scvariant TYPE scvariant,     "Screen Variant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          progname  TYPE bdc_prog,      "Program Name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          dynpro    TYPE bdc_dynr,      "SCreen Number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        END OF type_scvar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : s_scvar TYPE type_scvar.        "local structure for type s_scvar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ls_mepoheader TYPE mepoheader.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ls_mepoheader = im_header-&amp;gt;get_data( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF ls_mepoheader-bsart = 'ZAR1' OR ls_mepoheader-bsart = 'ZAR2'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Get Transaction Variant Details&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT SINGLE c&lt;SUB&gt;tcvariant c&lt;/SUB&gt;scvariant p&lt;SUB&gt;dynpro p&lt;/SUB&gt;progname&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        INTO (s_scvar-tcvariant, s_scvar-scvariant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              s_scvar-dynpro, s_scvar-progname)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        FROM shdtvsvciu AS c&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        INNER JOIN shdsvci AS p&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        ON c&lt;SUB&gt;scvariant = p&lt;/SUB&gt;scvariant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        WHERE c~tcvariant = 'ZME22N'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IF iv_progname = s_scvar-progname.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Assign Screen Variant&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'RS_HDSYS_SET_SC_VARIANT'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          progname            = s_scvar-progname&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          dynpro              = s_scvar-dynpro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          scvariant           = s_scvar-scvariant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          overwrite_scvariant = 'X'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          set_immediately     = 'X'.&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;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2009 19:59:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screen-variant-me22n/m-p/6089617#M1358507</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-28T19:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: Screen Variant - ME22N</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screen-variant-me22n/m-p/6089618#M1358508</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;Any ideas where to place the code, so the variant will take effect?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Sep 2009 15:37:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screen-variant-me22n/m-p/6089618#M1358508</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-01T15:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Screen Variant - ME22N</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screen-variant-me22n/m-p/6089619#M1358509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;    I am not sure but why dont you try leave to transaction rather than the FM like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

IF ls_mepoheader-bsart = 'ZAR1' OR ls_mepoheader-bsart = 'ZAR2'.
 leave to transaction ZME22N'.
ENDIF&amp;gt;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but for the above to work we need to create a parameter transaction ZME22N and assign the screen variant that you ahve created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Himanshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Sep 2009 15:52:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screen-variant-me22n/m-p/6089619#M1358509</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-01T15:52:04Z</dc:date>
    </item>
  </channel>
</rss>

