Skip to Content
avatar image
Former Member

Calling screen in FB03

Hello Friends,

I have a problem like this.

I have developed a Z report. It is displaying one ALV grid Like FB03. Now if i click on any row it should call 3rd screen of FB03 transaction.

First screen of FB03---Doc number,Fiscal year and so on

Second screen ---Line items

3rd screen--Line item header.

Now i want to display 3rd screen directly , if i double click on my Z report output. How can i call 3rd screen?

Please give me the solution.

<removed_by_moderator>

Regards

Dinesh

Edited by: Julius Bussche on Oct 20, 2008 5:53 PM

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

7 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 20, 2008 at 04:01 PM

    Call Transaction FB09D instead.

    Rob

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 20, 2008 at 03:54 PM

    Hi

    Are you speaking about the detail screen with item data?

    If it's so you need to call a CALL DIALOG, this is a sample:

            SELECT * INTO CORRESPONDING FIELDS OF TABLE BUZTAB FROM BSEG
                                          WHERE BUKRS = T_ITEM_PRV-BUKRS
                                            AND BELNR = T_ITEM_PRV-BELNR
                                            AND GJAHR = T_ITEM_PRV-GJAHR.
    *
            LOOP AT BUZTAB.
              CLEAR BUZTAB-FLAEN.
              MODIFY BUZTAB.
              IF BUZTAB-BUZEI = T_ITEM_PRV-BUZEI. " Selected line
                INDEX = SY-TABIX.
              ENDIF.
            ENDLOOP.
    
            BUZTAB-ZEILE = INDEX.
            X_COMMIT     = SPACE.
            TCODE        = 'FB03'.
    
            CALL DIALOG 'RF_ZEILEN_ANZEIGE'
                 EXPORTING
                      BUZTAB
                      BUZTAB-ZEILE
                      TCODE
                 IMPORTING
                      X_COMMIT.
    
            IF X_COMMIT = 'X'.
              COMMIT WORK.
            ENDIF.

    U can find the definition of structure BUZTAB in standard include RFEPOSC5

    Max

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 20, 2008 at 03:56 PM

    Hi Dinesh,

    Try to use USER_COMMAND and try to call the screen number through the specific Tabindex as a sample code which i coded to call the screen when i double click on my records.

    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM

    RS_SELFIELD TYPE SLIS_SELFIELD.

    READ TABLE T_ZFAOR INTO W_ZFAOR INDEX RS_SELFIELD-TABINDEX.

    PERFORM DATA_RETRIEVAL_ZASDF.

    ENDFORM. "USER_COMMAND

    &----


    *& Form DATA_RETRIEVAL_ZASDF

    &----


    • text

    ----


    • --> p1 text

    • <-- p2 text

    ----


    FORM DATA_RETRIEVAL_ZASDF .

    G_LOCAL = W_ZFAOR-EMPLID. "EMPLID is my id on which i have double clicked.

    CALL SCREEN 900.

    ENDFORM. " DATA_RETRIEVAL_Zasdf

    Modify the code accordingly.

    Cheers!!

    Balu

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 20, 2008 at 03:58 PM

    Hi,

    Use a call transaction with a BDC recording to do the navigation, then set the call transaction options to give control back to the user once the BDC data is exhausted.

    Something like....

    report  zbdc.
    
    data: gt_bdcdata type table of bdcdata,
          gs_bdcdata type bdcdata,
          gs_opt     type ctu_params.
    
    parameters: p_belnr like rf05l-belnr,
                p_bukrs like rf05l-bukrs,
                p_gjahr like rf05l-gjahr.
    
    start-of-selection.
    * Build a BDC to navigate to the 3rd screen of FB03
      clear gt_bdcdata.
    
    * Initial screen
      perform bdc_screen using : 'SAPMF05L' '100'.
      perform bdc_field  using : 'RF05L-BELNR'  p_belnr,
                                 'RF05L-BUKRS'  p_bukrs,
                                 'RF05L-GJAHR'  p_gjahr,
                                 'BDC_OKCODE'   '/00'.
    
    * Overview screen
      perform bdc_screen using : 'SAPMF05L' '0700'.
      perform bdc_field  using : 'BDC_CURSOR'  'RF05L-ANZDT(01)',
                                 'BDC_OKCODE'   '=PK'.
    
    * Drill down on item screen
      perform bdc_screen using : 'SAPMF05L' '0300'.
    
    
    * Call the transaction to navigate to the 3rd screen
      gs_opt-dismode = 'E'.
      gs_opt-nobiend = 'X'.
      call transaction 'FB03' using  gt_bdcdata
                              options from gs_opt.
    
    *&---------------------------------------------------------------------*
    *&      Form  bdc_screen
    *&---------------------------------------------------------------------*
    form bdc_screen  using    i_prog i_screen.
    
      clear gs_bdcdata.
      gs_bdcdata-program  = i_prog.
      gs_bdcdata-dynpro   = i_screen.
      gs_bdcdata-dynbegin = 'X'.
      append gs_bdcdata to gt_bdcdata.
    
    endform.                    " bdc_screen
    
    *&---------------------------------------------------------------------*
    *&      Form  bdc_field
    *&---------------------------------------------------------------------*
    form bdc_field  using    i_name i_value.
    
      clear gs_bdcdata.
      gs_bdcdata-fnam = i_name.
      gs_bdcdata-fval = i_value.
      append gs_bdcdata to gt_bdcdata.
    
    endform.                    " bdc_field

    Darren

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 20, 2008 at 03:47 PM

    Record a BDC and in program using call transaction FB03.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi, I can do BDC . but in the second screen we have line item.

      How can i capture which line item i have to click. I cannot click each time first line .

      I hope you understand my point.

      Regards

      Dinesh

  • Oct 20, 2008 at 04:05 PM

    You could also try calling transaction FB09D (and skip first screen).

    Thomas

    Edit: ouch...waited too long before submitting 😊

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 24, 2010 at 12:14 PM

    This message was moderated.

    Add comment
    10|10000 characters needed characters exceeded