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

bdc aco3

Hi all,

i developed a bdc program for transaction aco3. (sesion method).

its working fine. i transported it to production client. wen i run the bdc. session is created. wen i process the sesion in foreground it is taking to aco3 transaction,here values are not populating.its showing the message fill the required fields.

the same file i gave it in development its working fine.

can any body help me in this regard.

thanks in advance

siva

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jun 11, 2007 at 10:20 AM

    Hi

    See the sample Code for AC02 Tcode

    REPORT zmm_service_master_upload

    NO STANDARD PAGE HEADING

    LINE-SIZE 255.

    • Standard Include for Selection Screen

    INCLUDE bdcrecx1.

    • Internal Table for Upload Data

    DATA: BEGIN OF record OCCURS 0,

    asktx(040), " Service Description

    astyp(004), " Service Category

    meins(003), " Unit of Measure

    formelnr(010), " Formula

    END OF record.

    • Parameters

    PARAMETERS: p_file LIKE ibipparms-path. " Filename

    • At selection-screen on Value Request for file Name

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

    • Get the F4 Values for the File

    CALL FUNCTION 'F4_FILENAME'

    EXPORTING

    program_name = syst-cprog

    dynpro_number = syst-dynnr

    IMPORTING

    file_name = p_file.

    • Start of Selection

    START-OF-SELECTION.

    • Open the BDC Session

    PERFORM open_group.

    • Upload the File into internal Table

    CALL FUNCTION 'UPLOAD'

    EXPORTING

    filename = p_file

    filetype = 'DAT'

    TABLES

    data_tab = record

    EXCEPTIONS

    conversion_error = 1

    invalid_table_width = 2

    invalid_type = 3

    no_batch = 4

    unknown_error = 5

    gui_refuse_filetransfer = 6

    OTHERS = 7.

    IF sy-subrc <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    • Upload the Data from Internal Table

    LOOP AT record.

    PERFORM bdc_dynpro USING 'SAPLBAS0' '0300'.

    PERFORM bdc_field USING 'BDC_CURSOR'

    'ASMD-ASNUM'.

    PERFORM bdc_field USING 'BDC_OKCODE'

    '=NEW'.

    PERFORM bdc_dynpro USING 'SAPLBAS0' '0300'.

    PERFORM bdc_field USING 'BDC_CURSOR'

    'ASMD-ASTYP'.

    PERFORM bdc_field USING 'BDC_OKCODE'

    'POST'.

    PERFORM bdc_field USING 'ASMDT-ASKTX'

    record-asktx.

    PERFORM bdc_field USING 'ASMD-ASTYP'

    record-astyp.

    PERFORM bdc_field USING 'ASMD-MEINS'

    record-meins.

    PERFORM bdc_field USING 'ASMD-FORMELNR'

    record-formelnr.

    • Call the Transaction

    PERFORM bdc_transaction USING 'AC02'.

    ENDLOOP.

    • Close the BDC Session

    PERFORM close_group.

    <b>Reward points for useful Answers</b>

    Regards

    Anji

    Add a comment
    10|10000 characters needed characters exceeded

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.