<?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: Open new class or function builder window per program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-new-class-or-function-builder-window-per-program/m-p/989475#M73830</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Definitely not the best way, but a solution none the less.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0003 .

data:   bdcdata like bdcdata    occurs 0 with header line.
data:   messtab like bdcmsgcoll occurs 0 with header line.

parameters: p_fmname(50) type c,
            p_clname(50) type c.

start-of-selection.

  perform call_transaction.

************************************************************************
*      Form  CALL_TRANSACTION.
************************************************************************
form call_transaction..

  data: session_name(30) type c.
  data: tcode type sy-tcode.

  clear bdcdata. refresh bdcdata.
  clear messtab. refresh messtab.

  clear: session_name.

  concatenate sy-uname sy-datum sy-uzeit into session_name.

  if p_fmname &amp;lt;&amp;gt; space.

    tcode = 'SE37'.

    perform bdc_dynpro      using 'SAPMS38L' '1009'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RS38L-NAME'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SHOW'.
    perform bdc_field       using 'RS38L-NAME'
                            p_fmname.


  elseif p_clname &amp;lt;&amp;gt; space.

    tcode = 'SE24'.

    perform bdc_dynpro      using 'SAPLSEOD' '1000'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'SEOCLASS-CLSNAME'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=CIDI'.
    perform bdc_field       using 'SEOCLASS-CLSNAME'
                            p_clname.

  endif.

* Call the transaction in another session
  call function 'ABAP4_CALL_TRANSACTION'
      starting new task session_name
          destination 'NONE'
               exporting
                 tcode                         = tcode
                 mode_val                      = 'E'
                 update_val                    = 'S'
               tables
                 using_tab                     = bdcdata
                 mess_tab                      = messtab
               exceptions
                 call_transaction_denied       = 1
                 tcode_invalid                 = 2
                 others                        = 3.


endform.

*----------------------------------------------------------------------*
*        Start new screen                                              *
*----------------------------------------------------------------------*
form bdc_dynpro using program dynpro.
  clear bdcdata.
  bdcdata-program  = program.
  bdcdata-dynpro   = dynpro.
  bdcdata-dynbegin = 'X'.
  append bdcdata.
endform.

*----------------------------------------------------------------------*
*        Insert field                                                  *
*----------------------------------------------------------------------*
form bdc_field using fnam fval.
  clear bdcdata.
  bdcdata-fnam = fnam.
  bdcdata-fval = fval.
  append bdcdata.
endform.

&lt;/CODE&gt;&lt;/PRE&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>Thu, 30 Jun 2005 15:19:34 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2005-06-30T15:19:34Z</dc:date>
    <item>
      <title>Open new class or function builder window per program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-new-class-or-function-builder-window-per-program/m-p/989474#M73829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in my program I've got a string variable &amp;lt;b&amp;gt;a&amp;lt;/b&amp;gt; that either holds the name of a class or of a function module. Besides there is a variable &amp;lt;b&amp;gt;b&amp;lt;/b&amp;gt; that tells me whether &amp;lt;b&amp;gt;a&amp;lt;/b&amp;gt; is the name of a class or a function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I would like to open a new sapgui window that either shows the class named by &amp;lt;b&amp;gt;a&amp;lt;/b&amp;gt; in the class builder or the function module namend by &amp;lt;b&amp;gt;a&amp;lt;/b&amp;gt; in the function builder depending on the value of &amp;lt;b&amp;gt;b&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I experimented with sap's cl_wb_startup and cl_wb_request but calling the start method of cl_wb_startup gives an error stating that I've got no permission to access transaction wb_new_window.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question is now if there is another way to open the desired sapgui window or if my experiments went into the right direction but I need to get the required transaction permission.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance and best ergards,&lt;/P&gt;&lt;P&gt;Patrick Baer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2005 14:51:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-new-class-or-function-builder-window-per-program/m-p/989474#M73829</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-30T14:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: Open new class or function builder window per program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-new-class-or-function-builder-window-per-program/m-p/989475#M73830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Definitely not the best way, but a solution none the less.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0003 .

data:   bdcdata like bdcdata    occurs 0 with header line.
data:   messtab like bdcmsgcoll occurs 0 with header line.

parameters: p_fmname(50) type c,
            p_clname(50) type c.

start-of-selection.

  perform call_transaction.

************************************************************************
*      Form  CALL_TRANSACTION.
************************************************************************
form call_transaction..

  data: session_name(30) type c.
  data: tcode type sy-tcode.

  clear bdcdata. refresh bdcdata.
  clear messtab. refresh messtab.

  clear: session_name.

  concatenate sy-uname sy-datum sy-uzeit into session_name.

  if p_fmname &amp;lt;&amp;gt; space.

    tcode = 'SE37'.

    perform bdc_dynpro      using 'SAPMS38L' '1009'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RS38L-NAME'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SHOW'.
    perform bdc_field       using 'RS38L-NAME'
                            p_fmname.


  elseif p_clname &amp;lt;&amp;gt; space.

    tcode = 'SE24'.

    perform bdc_dynpro      using 'SAPLSEOD' '1000'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'SEOCLASS-CLSNAME'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=CIDI'.
    perform bdc_field       using 'SEOCLASS-CLSNAME'
                            p_clname.

  endif.

* Call the transaction in another session
  call function 'ABAP4_CALL_TRANSACTION'
      starting new task session_name
          destination 'NONE'
               exporting
                 tcode                         = tcode
                 mode_val                      = 'E'
                 update_val                    = 'S'
               tables
                 using_tab                     = bdcdata
                 mess_tab                      = messtab
               exceptions
                 call_transaction_denied       = 1
                 tcode_invalid                 = 2
                 others                        = 3.


endform.

*----------------------------------------------------------------------*
*        Start new screen                                              *
*----------------------------------------------------------------------*
form bdc_dynpro using program dynpro.
  clear bdcdata.
  bdcdata-program  = program.
  bdcdata-dynpro   = dynpro.
  bdcdata-dynbegin = 'X'.
  append bdcdata.
endform.

*----------------------------------------------------------------------*
*        Insert field                                                  *
*----------------------------------------------------------------------*
form bdc_field using fnam fval.
  clear bdcdata.
  bdcdata-fnam = fnam.
  bdcdata-fval = fval.
  append bdcdata.
endform.

&lt;/CODE&gt;&lt;/PRE&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>Thu, 30 Jun 2005 15:19:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-new-class-or-function-builder-window-per-program/m-p/989475#M73830</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-06-30T15:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Open new class or function builder window per program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-new-class-or-function-builder-window-per-program/m-p/989476#M73831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rich !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Definitely a solution. I would still like to try and find a more elegant solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other suggestions ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Patrick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jul 2005 07:13:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-new-class-or-function-builder-window-per-program/m-p/989476#M73831</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-01T07:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: Open new class or function builder window per program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-new-class-or-function-builder-window-per-program/m-p/989477#M73832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is another way, but user will have to hit the display button to go in the fm/class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001 .

parameters: p_fmname(50) type c,
            p_clname(50) type c.

start-of-selection.

  perform call_transaction.

************************************************************************
*      Form  CALL_TRANSACTION.
************************************************************************
form call_transaction..

  data: session_name(30) type c.
  data: tcode type sy-tcode.
  data: parms type table of rfc_spagpa with header line.

  clear: session_name.
  concatenate sy-uname sy-datum sy-uzeit into session_name.

  if p_fmname &amp;lt;&amp;gt; space.

    tcode = 'SE37'.

    parms-parid = 'LIB'.
    parms-parval = p_fmname.
    append parms.

  elseif p_clname &amp;lt;&amp;gt; space.

    tcode = 'SE24'.

    parms-parid = 'CLASS'.
    parms-parval = p_clname.
    append parms.

  endif.

* Call the transaction in another session
  call function 'ABAP4_CALL_TRANSACTION'
      starting new task session_name
          destination 'NONE'
               exporting
                 tcode                         = tcode
                 skip_screen                   = 'X'
               tables
                  spagpa_tab                    = parms
               exceptions
                 call_transaction_denied       = 1
                 tcode_invalid                 = 2
                 others                        = 3.


endform.

&lt;/CODE&gt;&lt;/PRE&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>Fri, 01 Jul 2005 12:29:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-new-class-or-function-builder-window-per-program/m-p/989477#M73832</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-07-01T12:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Open new class or function builder window per program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-new-class-or-function-builder-window-per-program/m-p/989478#M73833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks again, this one already looks more streamlined than the first version.&lt;/P&gt;&lt;P&gt;I am currently working on another solution:&lt;/P&gt;&lt;P&gt;the function module WB_REQUEST_NEW_WINDOW does the job already but I encounter a really strange behaviour:&lt;/P&gt;&lt;P&gt;The function builder or class builder (depending on which kind of object I want do display) is correctly opened and in the title bar I can see that the correct object is shown.&lt;/P&gt;&lt;P&gt;The strange thing is: below the SAPGUI menu button bar where the main screen of the function builder / class builder should display, I see an alv grid that I display somewhere else in my application &lt;SPAN __jive_emoticon_name="alert"&gt;&lt;/SPAN&gt; I have not the slightest idea where this comes from !!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Trying to solve this issue nevertheless and will call back if I succeed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Patrick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jul 2005 12:43:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-new-class-or-function-builder-window-per-program/m-p/989478#M73833</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-01T12:43:31Z</dc:date>
    </item>
  </channel>
</rss>

