Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

call transaction different thatn tcode in gui ?

former_member186143
Active Contributor
0 Kudos

I have the transaction PV1A

when I call this transaction in the gui I have the GOS object visible and the tcode also has other behaviours.

when I call PV1A from ABAP with bdcdata then the behaviour is quite different, GOS is no longer possible and other things also works differently than normal. anybody got a clue if I can let the tcode run as expected by the user ??


            WHEN 'PV1A'.
              PERFORM bdc_dynpro USING 'SAPLRHVA' '3000'.
              PERFORM bdc_field  USING 'BDC_OKCODE' '/00'.

              PERFORM bdc_field  USING 'HRVPVA-EVSRK' rs_selfield-value.
              PERFORM bdc_field  USING 'BDC_OKCODE' '=AEND'.

          ENDCASE.

          CALL TRANSACTION f_tcode USING bdcdata MODE 'E' UPDATE  'S'.
          COMMIT WORK.

kinnd regards

arthur de smidt

1 ACCEPTED SOLUTION

former_member186143
Active Contributor
0 Kudos

I finally implemented the modification and created a parameter for the field

HRVPVA-EVSRK

with call transaction the parameter is passed well but still the transaction runs differently then when you do the call just from the menu


          SET PARAMETER ID 'ZZ_EVSRK' FIELD rs_selfield-value.
          CALL TRANSACTION 'PV1A' AND SKIP FIRST SCREEN.

the behaviour is still the same compared to BDC. no gos available and weblink screen is completly different

kind regards

arthur

Edited by: A. de Smidt on Oct 31, 2008 2:48 PM

13 REPLIES 13

Former Member
0 Kudos

According to note 393310, PV1A is not suitable for batch input. Check it. It has other suggestions.

Rob

0 Kudos

very helpful the note but no use for me since the tcode works totaly different than PV1A

is there no way I can connect a parameter to the transaction for the field

HRVPVA-EVSRK

??

kind regards

arthur de smidt

0 Kudos

Are you trying to do this with CALL TRANSACTION?

You could just let it go to the first screen and let the user fill in the event.

Rob

0 Kudos

yep but that's the problem the user doesn't know which event it is, one of the charateristics of GRAPH_GANTT is that you can't see a lot of information, perhaps 1 word or so. therefore I designed jumping to the tcode so that people could see or change which event is what.

I work with colors to symbolize the different types of events. but when a user has to click on a event which is half a cm wide and 1 cm high he or she has no clue which event it actually is.

kind regards

arthur de smidt

0 Kudos

hmmm really stuck in this one, I can't call call transaction and skip first screen because there is no parameter available for the key and with Batch input the whole transaction behaves different than standard

I try with all kind op options switching on or off but no luck so far.

bit stupid that SAP tells in the note that BDC doesn't work well with PV1A but they don't give an alternative in the form of parameters

last try was


      IF f_tcode = 'PV1A'.
        REFRESH bdcdata.
        PERFORM bdc_dynpro USING 'SAPLRHVA' '3000'.
        PERFORM bdc_field  USING 'HRVPVA-EVSRK' h_objid.
*        PERFORM bdc_field  USING 'BDC_OKCODE' '=AEND'.

        CALL TRANSACTION f_tcode USING bdcdata MODE 'A' .

is there a reason that SAP doesn't make parameters for these transactions ??

kind regards

arthur

0 Kudos

OK - you could make your own PID and attach it to the field in this screen, but that would be a mod.

Rob

former_member188685
Active Contributor
0 Kudos

when you are dealing with GOS , you have to work with Function module/classes available for GOS.

what exactly you are doing with the BDC

0 Kudos

I use the graphic interface function GRAPH_ACTION in a report so that the frontdesk can easily see when and which rooms are available. if they need more information they can also click on the event in the graph and the tcode is started. since I had no parameters which I could pass (or I didn't find them) I thought I had to use BDC

kind regards

arthur de smidt

former_member186143
Active Contributor
0 Kudos

I finally implemented the modification and created a parameter for the field

HRVPVA-EVSRK

with call transaction the parameter is passed well but still the transaction runs differently then when you do the call just from the menu


          SET PARAMETER ID 'ZZ_EVSRK' FIELD rs_selfield-value.
          CALL TRANSACTION 'PV1A' AND SKIP FIRST SCREEN.

the behaviour is still the same compared to BDC. no gos available and weblink screen is completly different

kind regards

arthur

Edited by: A. de Smidt on Oct 31, 2008 2:48 PM

0 Kudos

Did you consider using OPTIONS when doing the CALL TRANSACTION to set NOBINPT?

Rob

0 Kudos

wow that seems to work...... almost

the transaction runs smoothly now byt when I save the whole programm is locked .

when I start the combination from alv it works fine but within the function of graph_gantt it loses somehow the connection

I can start PV1A but after save I have to close the graph_gant before it comes back into debugging again.

as can be seen I try a lot op options to see whatever will work.

how can I close the screen of PV1A after save ??

I can see that it is possible to work with it


 WHILE m_typ NE 'D'.


    CALL FUNCTION 'GRAPH_ACTION'       "// CUA-Information
         TABLES
              help   = help
              action = action
              actbar = actbar.


    CALL FUNCTION 'GRAPH_GANTT'
          EXPORTING
*         COMMAND_OK      = ' '
*         CONFIRM         = ' '
*         DFEL            = ' '
*         DFMS            = ' '
           glength         = 500
*         HGRID           = ' '
           legend          = 'Legenda'(005)
           modif           = 'PICK'
*         MY_CUA_PROG     = 'RPTLEA40'
*         MY_CUA_STAT     = 'GRAPH_01'
*         NOTXT           = ' '
*         NO_EL_POPUP     = ' '
           no_ex_popup     = 'X'
*         NO_IT_POPUP     = ' '
*         NO_MS_POPUP     = ' '
*         NO_SORT         = ' '
          pwdid           = 'X'
*         SET_FOCUS       = 'x'
           so_contents     = 'Grafisch overzicht'(007)
           so_receiver     = sapname-usrnam
           so_send         = ' '
           so_title        = ' '
           stat            = gantt_stat
*         SUPER           = ' '
*         TIMER           = 0
           tlength         = 25
*         TLINE           = ' '
           tmbeg           = start
           tmend           = ende
           tmview          = start
           ttext           = 'Name'(006)
           ttitle          = 'Grafisch overzicht'(007)
           tunit           = unit
           vgrid           = 'X'
*         WHEADER         = ' '
*         WINID           = ' '
          IMPORTING
*         AKT_SVIEW       =
*         AKT_TMBEG       =
*         AKT_TMEND       =
*         AKT_TUNIT       =
           cua_id          = cua_id
           g_typ           = g_typ
           m_typ           = m_typ
*         RBUFF           =
*         RWNID           =
          TABLES
           elem            = elem
           item            = item
           lgel            = lgel
           lgms            = mist
           mist            = mist
           msgt            = back
      EXCEPTIONS
           inv_elem_bakgr  = 01
           inv_elem_bordr  = 01
           inv_elem_forgr  = 01
           inv_elem_place  = 01
           inv_item_ucolor = 01
           inv_mist_color  = 01
           inv_mist_form   = 01
           inv_mist_pos    = 01
           inv_mist_size   = 01.



* Graphikfehler abfangen
    IF sy-subrc NE '0'.
      MESSAGE e016 WITH 'Fehler beim Erstellen der Graphik'(014).
    ENDIF.

    gantt_stat = '4'.
    READ TABLE back INDEX 1.
    IF back-itm NE space.
      CLEAR elem_id.
      MOVE back-itm TO h_item.
      READ TABLE elem_id WITH KEY itemno = h_item beg = back-beg dur = back-dur.


      h_objid = elem_id-txt.

      AUTHORITY-CHECK OBJECT 'S_TCODE'
                  ID 'TCD' FIELD 'PV1A'.
*ads  IF t370a-aktyp = 'V'.
      IF sy-subrc = 0.
        f_tcode = 'PV1A'.
      ELSE.
        f_tcode = 'PV1B'.
      ENDIF.

      IF f_tcode = 'PV1A'.
        REFRESH bdcdata.
        PERFORM bdc_dynpro USING 'SAPLRHVA' '3000'.
        PERFORM bdc_field  USING 'HRVPVA-EVSRK' h_objid.
        PERFORM bdc_field  USING 'BDC_OKCODE' '=AEND'.
        opt-updmode = 'L'.
        opt-dismode = 'E'.
        opt-nobinpt = 'X'.
        opt-nobiend = ' '.
        opt-defsize = 'X'.
        CALL TRANSACTION f_tcode USING bdcdata OPTIONS FROM opt.
        opt-nobinpt = ' '.
*
*        SET PARAMETER ID 'ZZ_EVSRK' FIELD h_objid.
*        CALL TRANSACTION 'PV1A' and skip first screen.
*        COMMIT WORK.

      ELSE.
        REFRESH bdcdata.
        PERFORM bdc_dynpro USING 'SAPLRHVA' '4000'.
        PERFORM bdc_field  USING 'HRVPVA-EVSRK' h_objid.
        PERFORM bdc_field  USING 'BDC_OKCODE' '=DISP'.

        CALL TRANSACTION f_tcode USING bdcdata MODE 'E' UPDATE  'A'.


      ENDIF.

      REFRESH back.
      CLEAR back.

    ENDIF.

    CASE g_typ.

      WHEN '2'.
        AUTHORITY-CHECK OBJECT 'S_TCODE'
              ID 'TCD' FIELD 'PSV2'.
        IF sy-subrc = 0.
          CALL TRANSACTION 'PSV2'.
        ENDIF.
    ENDCASE.

  ENDWHILE.

kind regards

arthur

Edited by: A. de Smidt on Nov 19, 2008 10:55 AM

Edited by: A. de Smidt on Nov 19, 2008 11:09 AM

0 Kudos

Just a thought - try changing UPDATE back to 'S'.

Rob

0 Kudos

that also didn't help, I tried all the options (when I copied paste it then L was the last option used). but considering the logic of the graph function the behaviour is explainable. the screen from pv1a would not go away but from the graphical output you could click on another event and could start it over.

I guess we can live with it so far as it works now.

kind regards

arthur de smidt