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

bdc program

pl. send bdc model program for real time project for F-28, F-53, FB60, FB70, MIRO,VF01. Pl. send it in my mail id rammtec_4u@yahoo.com. it's urgent pl.

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 Jan 29, 2008 at 06:17 AM

    Hi,

    Please see the BDC Program For FB60 Transaction:

    I can call in fm level:

    The Follwing are declared in TOP Include:

    DATA: atg_bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE,

    atg_messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.

    DATA: BEGIN OF it_atg_invfo OCCURS 0,

    accnt(17),

    bldat(10),

    xblnr(16),

    budat(10),

    wrbtr(15),

    waers(5),

    xmwst(1),

    bupla(5),

    sgtxt(50),

    END OF it_atg_invfo.

    DATA: BEGIN OF atg_acgl,

    hkont(10),

    wrbtr(15),

    mwskz(2),

    prctr(10),

    END OF atg_acgl.

    DATA: lv_count(2) TYPE n.

    DATA:it_acgl_item TYPE STANDARD TABLE OF acgl_item.

    The Follwing subroutines written in :LZATG_VEN_LIBF01

    ----


    ***INCLUDE LZATG_VEN_LIBF01 .

    ----


    ----


    • Start new screen *

    ----


    FORM bdc_dynpro USING program dynpro.

    CLEAR atg_bdcdata.

    atg_bdcdata-program = program.

    atg_bdcdata-dynpro = dynpro.

    atg_bdcdata-dynbegin = 'X'.

    APPEND atg_bdcdata.

    ENDFORM. "BDC_DYNPRO

    ----


    • Insert field *

    ----


    FORM bdc_field USING fnam fval.

    CLEAR atg_bdcdata.

    atg_bdcdata-fnam = fnam.

    atg_bdcdata-fval = fval.

    APPEND atg_bdcdata.

    ENDFORM. "BDC_FIELD

    &----


    *& Form GL_ACCOUNTS

    &----


    • text

    ----


    • -->P_ATG_ACGL_ITEM_HKONT text

    • -->P_ATG_ACGL_ITEM_WRBTR text

    • -->P_ATG_ACGL_ITEM_MWSKZ text

    • -->P_ATG_ACGL_ITEM_PRCTR text

    • -->P_LV_COUNT text

    ----


    FORM gl_accounts TABLES p_atg_acgl_item LIKE it_acgl_item

    USING p_lv_count TYPE any.

    DATA: atg_hkont(22) TYPE c,

    atg_wrbtr(22) TYPE c,

    atg_mwskz(22) TYPE c,

    atg_prctr(22) TYPE c.

    STATICS: V(2) TYPE N VALUE 1.

    CLEAR: atg_hkont,

    atg_wrbtr,

    atg_mwskz,

    atg_prctr.

    atg_acgl-hkont = p_atg_acgl_item-hkont.

    atg_acgl-wrbtr = p_atg_acgl_item-wrbtr.

    atg_acgl-mwskz = p_atg_acgl_item-mwskz.

    atg_acgl-prctr = p_atg_acgl_item-prctr.

    CONCATENATE atg_hkont 'ACGL_ITEM-HKONT' '(' v ')' INTO atg_hkont.

    CONCATENATE atg_wrbtr 'ACGL_ITEM-WRBTR'

    '(' v ')' INTO atg_wrbtr.

    CONCATENATE atg_mwskz 'ACGL_ITEM-MWSKZ'

    '(' v ')' INTO atg_mwskz.

    CONCATENATE atg_prctr 'ACGL_ITEM-PRCTR'

    '(' v ')' INTO atg_prctr.

    IF p_lv_count GE 4.

    PERFORM bdc_dynpro USING 'SAPMF05A' '1100'.

    PERFORM bdc_field USING

    'BDC_CURSOR' atg_mwskz.

    PERFORM bdc_field USING 'BDC_OKCODE' '=0005'.

    v = 4.

    ELSE.

    ADD 1 TO V.

    ENDIF.

    PERFORM bdc_dynpro USING 'SAPMF05A' '1100'.

    PERFORM bdc_field USING 'BDC_OKCODE' '/00'.

    PERFORM bdc_field USING atg_wrbtr atg_acgl-wrbtr.

    PERFORM bdc_field USING atg_mwskz atg_acgl-mwskz.

    PERFORM bdc_field USING atg_hkont atg_acgl-hkont.

    PERFORM bdc_field USING atg_prctr atg_acgl-prctr.

    .

    ENDFORM. " GL_ACCOUNTS

    In FM level we wrote code:

    FUNCTION zatg_vend_lib_fb60.

    *"----


    ""Local Interface:

    *" IMPORTING

    *" REFERENCE(ATG_INVFO_ACCNT) TYPE C

    *" REFERENCE(ATG_INVFO_BLDAT) TYPE C

    *" REFERENCE(ATG_INVFO_XBLNR) TYPE C

    *" REFERENCE(ATG_INVFO_BUDAT) TYPE C

    *" REFERENCE(ATG_INVFO_WRBTR) TYPE C

    *" REFERENCE(ATG_INVFO_WAERS) TYPE C

    *" REFERENCE(ATG_INVFO_XMWST) TYPE C

    *" REFERENCE(ATG_INVFO_BUPLA) TYPE C

    *" REFERENCE(ATG_INVFO_SGTXT) TYPE C

    *" REFERENCE(ATG_BKPF_BUKRS) TYPE C

    *" EXPORTING

    *" VALUE(ATG_RETURN) LIKE BAPIRET2 STRUCTURE BAPIRET2

    *" TABLES

    *" ATG_ACGL_ITEM STRUCTURE ACGL_ITEM

    *"----


    DATA: atg_ctuparams LIKE ctu_params,

    atg_bkpf(05) TYPE c.

    • v_wrbtr(15) type c,

    • acgl_wrbtr(15) type c.

    • v_wrbtr = atg_invfo_wrbtr.

    *data: it_atg like ATG_ACGL_ITEM occurs 1 with header line.

    DATA: wbukrs(4) TYPE c.

    atg_ctuparams-dismode = 'A'.

    atg_ctuparams-updmode = 'L'.

    atg_ctuparams-defsize = 'X'.

    atg_ctuparams-nobinpt = 'X'.

    it_atg_invfo-accnt = atg_invfo_accnt.

    it_atg_invfo-bldat = atg_invfo_bldat.

    it_atg_invfo-xblnr = atg_invfo_xblnr.

    it_atg_invfo-budat = atg_invfo_budat.

    it_atg_invfo-wrbtr = atg_invfo_wrbtr.

    it_atg_invfo-waers = atg_invfo_waers.

    it_atg_invfo-xmwst = atg_invfo_xmwst.

    it_atg_invfo-bupla = atg_invfo_bupla.

    it_atg_invfo-sgtxt = atg_invfo_sgtxt.

    wbukrs = atg_bkpf_bukrs.

    PERFORM bdc_dynpro USING 'SAPMF05A' '1100'.

    PERFORM bdc_field USING 'BDC_OKCODE' '/00'.

    PERFORM bdc_field USING 'RF05A-BUSCS' 'R'.

    PERFORM bdc_field USING 'INVFO-ACCNT' it_atg_invfo-accnt.

    PERFORM bdc_field USING 'INVFO-BLDAT' it_atg_invfo-bldat.

    PERFORM bdc_dynpro USING 'SAPMF05A' '1100'.

    PERFORM bdc_field USING 'BDC_OKCODE' '/ECCDE'.

    PERFORM bdc_dynpro USING 'SAPLACHD' '1000'.

    PERFORM bdc_field USING 'BDC_OKCODE' '=ENTR'.

    PERFORM bdc_field USING 'BKPF-BUKRS' wbukrs.

    PERFORM bdc_dynpro USING 'SAPMF05A' '1100'.

    PERFORM bdc_field USING 'BDC_OKCODE' '/00'.

    PERFORM bdc_field USING

    'INVFO-XBLNR' it_atg_invfo-xblnr.

    PERFORM bdc_field USING

    'INVFO-BUDAT' it_atg_invfo-budat.

    PERFORM bdc_field USING 'INVFO-WRBTR' it_atg_invfo-wrbtr.

    PERFORM bdc_field USING 'INVFO-WAERS' it_atg_invfo-waers.

    PERFORM bdc_field USING 'INVFO-XMWST' it_atg_invfo-xmwst.

    PERFORM bdc_field USING 'INVFO-BUPLA' it_atg_invfo-bupla.

    PERFORM bdc_field USING 'INVFO-SGTXT' it_atg_invfo-sgtxt.

    • PERFORM bdc_dynpro USING 'SAPMF05A' '1100'.

    • PERFORM bdc_field USING 'BDC_OKCODE' '/00'.

    LOOP AT atg_acgl_item.

    ADD 1 TO lv_count.

    PERFORM gl_accounts TABLES atg_acgl_item

    USING lv_count.

    ENDLOOP.

    PERFORM bdc_field USING 'BDC_OKCODE' '=BU'.

    CALL TRANSACTION 'FB60' USING atg_bdcdata

    OPTIONS FROM atg_ctuparams

    MESSAGES INTO atg_messtab.

    REFRESH atg_bdcdata.

    ENDFUNCTION.

    If it is helpful rewards points.

    Regards

    Pratap.M

    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.