Skip to Content
author's profile photo Former Member
Former Member

BDC Possible on ALV?

Hi All,

We have a requirement to write BDC on the ALV. Is it possible to write BDC on ALV Grid?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 10, 2008 at 12:07 PM

    Hi,

    Can you please let us know more about the requirement.A bdc is for batch input. how are you planning to upload data in an ALV report?

    Viv

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 10, 2008 at 12:07 PM

    yes it is possible I do it in nuemrous occasions where users start an bdc depending on the selection they make in als but if you are not more specific in you're question than the answers can also not be very specific in detail

    kind regards

    arthur

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 10, 2008 at 12:07 PM

    Why dont you try it and find out.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 10, 2008 at 12:08 PM

    HI,

    You cannot record the any action on the ALV. But still the recording showing some values..as you run your BDC recording then there will no effect.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 11, 2008 at 03:46 AM

    Hi All,

    Requirement for my BDC is to record on ALV interactive. where from initial screen I am getting ALV output. and on that ALV I need to select line. and then process further for the output. I am having a doubt as the BDC Okcode is not getting line selection. Can we implement such requirement?

    I have tried the same. But i could not get through.

    Add a comment
    10|10000 characters needed characters exceeded

    • you don't get line selection with bdc ok code but with the chk field in the alv structure

      declare a field CHK type xfeld in you're alv structure

      here the parts you need in the alv to make it work

      with this example a user can select multiple tasks and click on a button to edit them. when 1 is saved or skipped then automaticaly the next one in the selection is executed

        slayout-box_fieldname = 'CHK'.
      
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
         EXPORTING
      *   I_INTERFACE_CHECK                 = ' '
      *   I_BYPASSING_BUFFER                = ' '
      *   I_BUFFER_ACTIVE                   = ' '
            i_callback_program                = h_repid
            i_callback_pf_status_set          = 'SET_PF_STATUS'
            i_callback_user_command           = 'USER_COMMAND'
      
      
      FORM user_command USING r_ucomm LIKE sy-ucomm
                              rs_selfield TYPE slis_selfield.
        CASE r_ucomm.
      
          WHEN 'WIJZ'.
            LOOP AT ta_zcs_operatielijst_alv WHERE chk = 'X'.
              REFRESH bdcdata.
              PERFORM display_change_maintenance_ord USING
                                                     ta_zcs_operatielijst_alv-aufnr
                                                     ta_zcs_operatielijst_alv-vornr
                                                     con_change
                                                     CHANGING
                                                     h_transaction_code.
      
              CALL TRANSACTION f_tcode USING bdcdata MODE 'E' UPDATE  'S'.
      
            ENDLOOP.
            COMMIT WORK.
      endform.
      
      FORM display_change_maintenance_ord USING    p_aufnr
                                                   p_vornr
                                                   p_activity TYPE c
                                          CHANGING p_transaction_code
                                                     LIKE sy-tcode.
      
        DATA: flg_transaction_found TYPE flag.
      
        PERFORM bdc_dynpro USING 'SAPLCOIH' '0101'.
        PERFORM bdc_field  USING 'CAUFVD-AUFNR' p_aufnr.
        CHECK NOT p_vornr IS INITIAL.
        PERFORM bdc_field  USING 'BDC_OKCODE' 'VGUE'.
        PERFORM bdc_dynpro USING 'SAPLCOIH'   '3000'.
        PERFORM bdc_field  USING 'BDC_OKCODE' 'OBSE'.
        PERFORM bdc_dynpro USING 'SAPLCO05' '2010'.
        PERFORM bdc_field  USING 'RCOLS-VORNR' p_vornr.
        PERFORM bdc_field  USING 'RC27X-OBJECT' 'O'.
        PERFORM bdc_dynpro USING 'SAPLCOIH'   '3000'.
        PERFORM bdc_field  USING 'RC27X-FLG_SEL(1)' 'X'.
        PERFORM bdc_field  USING 'BDC_OKCODE' 'VGD3'.
        PERFORM bdc_dynpro USING 'SAPLCOIH'   '3800'.
        IF p_activity = con_change.
          p_transaction_code = 'IW32'.
        ELSEIF p_activity = con_display.
          p_transaction_code = 'IW33'.
        ENDIF.
      
        flg_transaction_found = 'X'.
      
      ENDFORM.                               " DISPLAY_CHANGE_MAINTENANCE_ORD
      
      

      kind regards

      arthur

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.