BDC For T-Code F-02

Dear Friends,
Do anybody has the code for BDC for Transaction Code F-02.
If anybody has plz send me.
Thanks & Reg,
Nishant

try this:
REPORT zfir_f02
       NO STANDARD PAGE HEADING LINE-SIZE 255.
INCLUDE bdcrecx1.
TYPES : BEGIN OF tp_flatfile,
        bldat(10),
        doctyp(2),
        comp(4),
        postdate(10),
        period(2),
        currency(5),
        reference(16),
        htext(25),
        postkey(2),
        account(17),
        amount(16),
        profit(10),
        assign(18),
        text(50),
        busarea(4),
        cost(10),
        bline(10),
        base(16),
        postkey2(2),
        account2(17),
        amount2(16),
        profit2(10),
        assign2(18),
        text2(50),
        busarea2(4),
        END OF tp_flatfile.
DATA : t_flatfile TYPE TABLE OF tp_flatfile WITH HEADER LINE.
DATA : g_file TYPE string.
CLASS cl_abap_char_utilities DEFINITION LOAD.
CONSTANTS:con_tab  TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.
PARAMETERS :  p_file LIKE rlgrap-filename OBLIGATORY.
SELECTION-SCREEN END OF BLOCK blk1.
*C-- Selection Screen VALUE-REQUEST FOR File path
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
  CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      program_name  = syst-cprog
      dynpro_number = syst-dynnr
    IMPORTING
      file_name     = p_file.
  g_file = p_file.
*START-OF-SELECTION.
  CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
      filename                = g_file
      filetype                = 'ASC'
      has_field_separator     = 'X'
    TABLES
      data_tab                = t_flatfile
    EXCEPTIONS
      file_open_error         = 1
      file_read_error         = 2
      no_batch                = 3
      gui_refuse_filetransfer = 4
      invalid_type            = 5
      no_authority            = 6
      unknown_error           = 7
      bad_data_format         = 8
      header_not_allowed      = 9
      separator_not_allowed   = 10
      header_too_long         = 11
      unknown_dp_error        = 12
      access_denied           = 13
      dp_out_of_memory        = 14
      disk_full               = 15
      dp_timeout              = 16
      OTHERS                  = 17.
     loop at t_flatfile.
     write:/ t_flatfile-doctyp,t_flatfile-amount.
     endloop.
START-OF-SELECTION.
  PERFORM open_group.
  LOOP AT t_flatfile.
    PERFORM bdc_dynpro      USING 'SAPMF05A' '0100'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'RF05A-NEWKO'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '/00'.
    PERFORM bdc_field       USING 'BKPF-BLDAT'
                                  t_flatfile-bldat.
    PERFORM bdc_field       USING 'BKPF-BLART'
                                  t_flatfile-doctyp.
    PERFORM bdc_field       USING 'BKPF-BUKRS'
                                  t_flatfile-comp.
    PERFORM bdc_field       USING 'BKPF-BUDAT'
                                  t_flatfile-postdate.
    PERFORM bdc_field       USING 'BKPF-MONAT'
                                  t_flatfile-period.
    PERFORM bdc_field       USING 'BKPF-WAERS'
                                  t_flatfile-currency.
    PERFORM bdc_field       USING 'BKPF-XBLNR'
                                  t_flatfile-reference.
    PERFORM bdc_field       USING 'BKPF-BKTXT'
                                  t_flatfile-htext.
    PERFORM bdc_field       USING 'FS006-DOCID'
    PERFORM bdc_field       USING 'RF05A-NEWBS'
                                  t_flatfile-postkey.
    PERFORM bdc_field       USING 'RF05A-NEWKO'
                                  t_flatfile-account.
    CASE t_flatfile-postkey.
      WHEN '40' OR '50'.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'BSEG-SGTXT'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'BSEG-WRBTR'
                                      t_flatfile-amount.
        PERFORM bdc_field       USING 'BSEG-ZUONR'
                                      t_flatfile-assign.
        PERFORM bdc_field       USING 'BSEG-SGTXT'
                                      t_flatfile-text.
    IF t_flatfile-postkey = '40' and t_flatfile-account > '300000'.
            PERFORM bdc_field       USING 'DKACB-FMORE'
                                      'X'.
    ENDIF.
        PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'COBL-KOSTL'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ENTE'.
        PERFORM bdc_field       USING 'COBL-GSBER'
                                      t_flatfile-busarea.
       PERFORM bdc_field       USING 'BDC_OKCODE'
                                     '=ENTE'.
        PERFORM bdc_field       USING 'COBL-KOSTL'
                                      t_flatfile-cost.
        PERFORM bdc_field       USING 'COBL-PRCTR'
                                      t_flatfile-profit.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RF05A-NEWKO'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'RF05A-NEWBS'
                                      t_flatfile-postkey2.
        PERFORM bdc_field       USING 'RF05A-NEWKO'
                                      t_flatfile-account2.
        PERFORM debit_credit.
      WHEN '21' OR '31' OR '24' OR '34'.
**perform bdc_field       using 'RF05A-NEWBS'
                             '31'.
**perform bdc_field       using 'RF05A-NEWKO'
                             '25000'.
     PERFORM bdc_field       USING 'DKACB-FMORE'
                                   'X'.
     PERFORM bdc_dynpro      USING 'SAPMF05A' '0302'.
     PERFORM bdc_field       USING 'BDC_CURSOR'
                                   'RF05A-NEWKO'.
     PERFORM bdc_field       USING 'BDC_OKCODE'
                                   '/00'.
     PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
     PERFORM bdc_field       USING 'BDC_CURSOR'
                                   'COBL-GSBER'.
     PERFORM bdc_field       USING 'BDC_OKCODE'
                                   '=ENTE'.
     PERFORM bdc_field       USING 'COBL-GSBER'
                                   t_flatfile-busarea.
     PERFORM bdc_field       USING 'COBL-KOSTL'
                                   t_flatfile-cost.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0302'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RF05A-NEWKO'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'BSEG-WRBTR'
                                      t_flatfile-amount.
        PERFORM bdc_field       USING 'BSEG-GSBER'
                                      t_flatfile-busarea.
        PERFORM bdc_field       USING 'BSEG-ZFBDT'
                                      t_flatfile-bline.
        PERFORM bdc_field       USING 'BSEG-SKFBT'
                                      t_flatfile-base.
        PERFORM bdc_field       USING 'BSEG-ZUONR'
                                      t_flatfile-assign.
        PERFORM bdc_field       USING 'BSEG-SGTXT'
                                      t_flatfile-text.
        PERFORM bdc_field       USING 'RF05A-NEWBS'
                                      t_flatfile-postkey2.
        PERFORM bdc_field       USING 'RF05A-NEWKO'
                                      t_flatfile-account2.
       PERFORM bdc_dynpro      USING 'SAPLFWTD' '0100'.
       PERFORM bdc_field       USING 'BDC_CURSOR'
                                     'WITH_ITEM-WT_WITHCD(01)'.
       PERFORM bdc_field       USING 'BDC_OKCODE'
                                     '=GO'.
        PERFORM debit_credit.
     PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
     PERFORM bdc_field       USING 'BDC_CURSOR'
                                   'RF05A-NEWKO'.
     PERFORM bdc_field       USING 'BDC_OKCODE'
                                   '/00'.
     PERFORM bdc_field       USING 'BSEG-WRBTR'
                                   t_flatfile-amount2.
     PERFORM bdc_field       USING 'BSEG-ZUONR'
                                   t_flatfile-assign2.
     PERFORM bdc_field       USING 'BSEG-SGTXT'
                                   t_flatfile-text2.
     PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
     PERFORM bdc_field       USING 'BDC_CURSOR'
                                   'COBL-GSBER'.
     PERFORM bdc_field       USING 'BDC_OKCODE'
                                   '=ENTE'.
     PERFORM bdc_field       USING 'COBL-GSBER'
                                   t_flatfile-busarea2.
     PERFORM bdc_field       USING 'COBL-KOSTL'
                                   t_flatfile-cost.
     PERFORM bdc_field       USING 'COBL-PRCTR'
                                   t_flatfile-profit2.
     PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
     PERFORM bdc_field       USING 'BDC_CURSOR'
                                   'RF05A-NEWKO'.
     PERFORM bdc_field       USING 'BDC_OKCODE'
                                   '=BU'.
     PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
     PERFORM bdc_field       USING 'BDC_CURSOR'
                                   'COBL-GSBER'.
     PERFORM bdc_field       USING 'BDC_OKCODE'
                                   '=ENTE'.
      WHEN '01' OR '11' OR '04' OR '14' OR '07' OR '17'.
*perform bdc_field       using 'RF05A-NEWBS'
                             '11'.
*perform bdc_field       using 'RF05A-NEWKO'
                             '1'.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0301'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'BSEG-SGTXT'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'BSEG-WRBTR'
                                      t_flatfile-amount.
        PERFORM bdc_field       USING 'BSEG-MWSKZ'
        PERFORM bdc_field       USING 'BSEG-GSBER'
                                      t_flatfile-busarea.
        IF NOT t_flatfile-bline IS INITIAL.
          PERFORM bdc_field       USING 'BSEG-ZFBDT'
                                        t_flatfile-bline.
        ENDIF.
        IF NOT t_flatfile-base IS INITIAL.
          PERFORM bdc_field       USING 'BSEG-SKFBT'
                                        t_flatfile-base.
        ENDIF.
        PERFORM bdc_field       USING 'BSEG-ZUONR'
                                      t_flatfile-assign.
        PERFORM bdc_field       USING 'BSEG-SGTXT'
                                      t_flatfile-text.
        PERFORM bdc_field       USING 'RF05A-NEWBS'
                                      t_flatfile-postkey2.
        PERFORM bdc_field       USING 'RF05A-NEWKO'
                                      t_flatfile-account2.
        PERFORM debit_credit.
    ENDCASE.
*perform bdc_dynpro      using 'SAPMF05A' '0301'.
*perform bdc_field       using 'BDC_CURSOR'
                             'BSEG-WRBTR'.
*perform bdc_field       using 'BDC_OKCODE'
                             '=AB'.
*perform bdc_field       using 'BSEG-WRBTR'
                             '3,000.00'.
*perform bdc_field       using 'BSEG-MWSKZ'
*perform bdc_field       using 'BSEG-GSBER'
                             'VUSO'.
*perform bdc_field       using 'BSEG-ZFBDT'
                             '19.07.2005'.
*perform bdc_field       using 'BSEG-SKFBT'
                             '3,000.00'.
*perform bdc_field       using 'BSEG-ZUONR'
                             'ASSIGN'.
*perform bdc_field       using 'BSEG-SGTXT'
                             'TEXT'.
PERFORM bdc_dynpro      USING 'SAPMF05A' '0700'.
PERFORM bdc_field       USING 'BDC_CURSOR'
                               'RF05A-NEWBS'.
PERFORM bdc_field       USING 'BDC_OKCODE'
                               '=BU'.
*perform bdc_field       using 'BKPF-XBLNR'
                             'REF'.
*perform bdc_field       using 'BKPF-BKTXT'
                             'text'.
    PERFORM bdc_transaction USING 'F-02'.
  ENDLOOP.
  PERFORM close_group.
*&      Form  debit_credit
      text
FORM debit_credit.
**SRINI
IF t_flatfile-postkey = '40' OR t_flatfile-postkey = '50'.
  PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
  PERFORM bdc_field       USING 'BDC_CURSOR'
                                'COBL-GSBER'.
  PERFORM bdc_field       USING 'BDC_OKCODE'
                                '=ENTE'.
ENDIF.
***SRINI
  PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
  PERFORM bdc_field       USING 'BDC_CURSOR'
                                'RF05A-NEWKO'.
  PERFORM bdc_field       USING 'BDC_OKCODE'
                                '/00'.
  PERFORM bdc_field       USING 'BSEG-WRBTR'
                                t_flatfile-amount2.
  PERFORM bdc_field       USING 'BSEG-ZUONR'
                                t_flatfile-assign2.
  PERFORM bdc_field       USING 'BSEG-SGTXT'
                                t_flatfile-text2.
  PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
  PERFORM bdc_field       USING 'BDC_CURSOR'
                               'COBL-KOSTL'.
                                'COBL-GSBER'.
  PERFORM bdc_field       USING 'BDC_OKCODE'
                                '=ENTE'.
  PERFORM bdc_field       USING 'COBL-GSBER'
                                t_flatfile-busarea2.
     PERFORM bdc_field       USING 'COBL-KOSTL'
                                   t_flatfile-cost.
  PERFORM bdc_field       USING 'COBL-PRCTR'
                                t_flatfile-profit2.
  PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
  PERFORM bdc_field       USING 'BDC_CURSOR'
                                'RF05A-NEWKO'.
  PERFORM bdc_field       USING 'BDC_OKCODE'
                                '=BU'.
  PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
  PERFORM bdc_field       USING 'BDC_CURSOR'
                                'COBL-GSBER'.
  PERFORM bdc_field       USING 'BDC_OKCODE'
                                '=ENTE'.
ENDFORM.                    "debit_credit
regards,
Bikash

Similar Messages

  • Standard BDC for t.code: FB01

    Hi,
    Is there any standard BDC available for T.code: FB01.
    Thanks and Regards,
    VK

    Hi,
    You can use standard program RFBIBL00 or BAPI BAPI_ACC_DOCUMENT_POST for this purpose.
    Creating BDC for FB01 mainly depends on your need. A generic one is difficult to be created due to multiple alternative screeens.
    Regards,
    Gaurav

  • BDC for Tax code updation

    Hi all,
    Iam trying to update tax code for open POs using T.Code ME22. For this iam writing BDC using call transaction.
    I have PO, POitem,INTROW,EXTROW,Required Tax code in input file.
    Pls guide me how to handle the updation of tax code with the available information.
    Note: All the POs are last fiscal yrs open POs.

    Record the BDC using SHDB with one of the records given in your file.
    Check the code and use it in your BDC program.

  • BDC for Transaction Code F-02

    Hi Everyone,
    Facing a problem in cross-company code G/L Accounts posting. When I enter the data in the transaction directly (not recording) with multiple items containing different company codes and save the transaction, The system leads me into another screen where a pop-up box displays the posted documents. This pop up box has a continue button which takes me back to the initial screen of F-02.
    The problem here is when I do the recording using the transaction SHDB and save at the end the recording stops and BDCDATA is displayed. In this case the Pop up box is not displayed. But when I used this program for data transfer the system stops at the point where the pop up box screen is displayed. Can anyone provide me any pointers to overcome this.
    Thank you.
    Regards,
    Chan

    HI
    In recording once u save, the recording comings out the transaction.
    If u want the pop-up to display before save. Then in recording also
    after entering all data and before Save press enter or do check.Try
    this way after that save the transaction.
    Regards,
    Raghu.

  • Problem in BDC for t-code QS41

    Hi,
    When I am recording the t-code QS41 normally,  Dialog structure screen ( Code group , codes ) does not appear
    then while recording I checked the not a batch input session chek box the screen got recorded.
    Now the problem is when I made program from this recording and run it the dialog structure screen is not getting displayed.
    is there any parameter to be passed in call transaction statment  to make it not a batch input session active ? or I am missiing something.
    Regards
    Bikas

    Hi Bikas,
    Use CTU_PARAMS structure to overcome this problem. Set binpt field to 'X' and call transaction.
    In call transaction use options to pass ctu_params.
    Go for F1 on call transaction if you dont knw the syntax  of call transaction with options.
    Hope this helps.
    Rgds.,
    subash

  • BDC for t-code CO48

    Hi,
    As per my requirement, i need to perform batch determination while converting the Planned order to Production order.
    I should convert only if Suitable Batch is available. But once we prepare the session in BDC, we won't be having any control to determine whether batch is assigned or not . So i have to perform the Batch determination before preparing & processing the session.
    Do we have any standard function modules or available programs to cater this requirement.
    Thanks,
    Surya

    1) fm job_open
    2) submit report
    3) fm job_close
    4) finally select table TBTCO
    example:
    DATA: jobcount_test LIKE tbtcjob-jobcount,
            job_released    LIKE btch0000-char1,
            rcode(2),
            strtimmed LIKE btch0000-char1 VALUE 'X'.
      DATA jobname  LIKE tbtcjob-jobname.
      CONCATENATE  'TEST_' sy-repid '_' sy-datum INTO jobname.
      CALL FUNCTION 'JOB_OPEN'
           EXPORTING
                jobname          = jobname
           IMPORTING
                jobcount         = jobcount_test
           EXCEPTIONS
                cant_create_job  = 1
                invalid_job_data = 2
                jobname_missing  = 3
                OTHERS           = 4.
      IF sy-subrc NE 0.
        MESSAGE x000(yp) WITH 'JOB-START ' jobname ' failed !!!'.
      ELSE.
    *--Step insert
        SUBMIT rsbdcsub
        USER sy-uname VIA JOB jobname NUMBER jobcount_test
        WITH mappe = map
        WITH von = pdatum
        WITH z_verarb = 'X'
        AND RETURN .
        CALL FUNCTION 'JOB_CLOSE'
             EXPORTING
                  jobcount             = jobcount_test
                  jobname              = jobname
                  strtimmed            = strtimmed
                  targetsystem         = sy-host
             IMPORTING
                  job_was_released     = job_released
             EXCEPTIONS
                  cant_start_immediate = 1
                  invalid_startdate    = 2
                  jobname_missing      = 3
                  job_close_failed     = 4
                  job_nosteps          = 5
                  job_notex            = 6
                  lock_failed          = 7
                  OTHERS               = 8.
        IF sy-subrc > 1.
          MESSAGE x000(yp) WITH 'JOB-CLOSE ' jobname ' failed!!!'.
        ENDIF.
      ENDIF.

  • Problem in bdc for MB01

    We have developed a bdc for t-code MB01.  We want to genreate material documents in background.  For some reasons we are not in a position to use BAPI for MIGO (as we are not able to input data of two fields).  we are on ECC 6.0
    BDC for MB01 is working fine.  Only thing is we want to input "Goods recipient" also in this bdc.  But we are not able to find this field in MB01.  is it possible to get goods recipient also in MB01?  how to do it?
    Also is there any problem in using bdc for MB01 instead of MIGO?

    Hello,
    try LSMW with Object 0110 - Material movement.
    You can develop standard LSMW for this object in half an hour.
    Andrzej

  • BDC for C201(Master Recipe Create)

    Dear,
    Please help me in the following situation:
    I have written a BDC for transaction code C201 for Master Recipe Creation. Its running ok.
    But I have doubts like
    for the 1st table control:
    1) if for one operartion there are more than 1 phases
        then what precautions are needed for page down.
    for the 2nd level inner table control:
    1) I am in the process of coding pagedown for this 2nd table control. If I have to code for it what all precautions will I have to take?
    And in total what all precautions will I have to take?
    How feasible is this BDC?
    I have searched for BAPI, but did not find one.
    Kindly help me. I am under client pressure.
    Thanks.
    Regards,
    Shambhavi.
    Edited by: Shambhavi Salunkhe on Jun 23, 2008 9:40 PM

    Hi,
    In C201 transaction we have a table control in the operations screen. below the table control we have some push buttons and a input text field, we can make use this field to handle the table control. If you are insertinga first operation, enter the value in first row of the table control. for the second operation onwards enter max valye like 99999 in the input text box and click on enter. all the previous rows will scroll up and always second row of the table control will be free, so you can put the data in the second row. in the same way you will have some button to handle the other table control too .I hope this will help You
    Thanks,
    rajinikanth
    Edited by: Rajinikanth G on Jun 23, 2008 6:53 PM

  • Error in BDC for VK-11

    Hi All,
    I have created a BDC for T-Code VK11. When I am loading the data then my BDC is throwing an error becoz for some materials Unit of Measurement(UOM) sceen is coming which I have not captured in BDC. This UOM is coming only for few materials and this screen is not coming when I m entering these materials manually.
    Can anybody plz help me out in solving this.
    Warm Regards,
    Nishu

    Do a recording with a material which is throwing u the UOM screen .
    IF ur flat file is not having Uom pick the values for the materials from MARA/ MARM table into a variable and submit it to the screen of UOM.
    See a recording will be done considering the fact that all the possible scenarios are handled . So If the screen is popping up with a UOM screen then it has to be handled .
    You have to capture this in ur BDC recording .
    Cause even it throws the UOM screen for one material u need to handle that .
    There is one more screen for UOM jsut do a select and pass the UOM for the material in the code
    if u r not intending to maintain the same in ur flat file.
    Regards,
    vijay

  • Need help on BDC  for MB1A transaction.

    Hello Abapers,
    I need to create a BDC for t-code MB1A to do the Goods Issue with reference to reservation.
    I am not able to use the BAPI 'BAPI_GOODSMVT_CREATE' to do the goods issue as there are some additional functionalities (Stock Determination) to be included.
    The problem I am facing is, The stock determination will determine the Quantity, Storage Location and Valuation type for every item of the reservation. The quantity will be picked up from multiple storage locations and as a result the line item of reservation will be split into two or more for Goods Issue.
    When this happens, If the reservation is having multiple line items, tracking the next item becomes a problem.
    Please suggest a way to approach this problem.
    Usefull answers will be rewarded.
    Thanks in Advance,
    Vinutha.

    Hi
    The COMMIT before and after CALL TRANSACTION is useless, The transaction FB01 calls the commit by itself, so u need only:
    CALL TRANSACTION 'FB01' USING BDC_TAB
                                                   MODE 'N'
                                                   UPDATE 'S'
                                                   MESSAGE ITAB.
    Now ITAB is like structure BDCMSGCOLL, so after CALL Transaction u can use message statament in order to show a popup with message:
    CALL TRANSACTION 'FB01' USING BDC_TAB
                                                   MODE 'N'
                                                   UPDATE 'S'
                                                   MESSAGE ITAB.
    LOOP AT ITAB.
    MESSAGE ID ITAB-MSGID TYPE 'I' NUMBER ITAB-MSGNR
             WITH ITAB-MSGV1 ITAB-MSGV2 ITAB-MSGV3 ITAB-MSGV4.
    ENDLOOP.
    Max

  • BDC for ik11

    Hello all
    i am new to BDC's & not very comfortable to create them. I have to create a BDC for T-Code "IK11", please anyone can guide me how to do that with proper steps or if any code can be given, that will be helpful.
    its bit urgent for me, so i would really appreciate your support & quick response.
    Points will be awarded.
    regards & thanx
    Prateek.

    Hi,
    Follow the steps accordingly
    Goto Shdb do the recording properly .
    Their is a button named program press it .
    Copy the entire code which are under start-of selection
    and place it in your main program
    you will get one include at the top just below the report
    get inside it
    Go at the bottom you will see two form copy it and paste it .
    Comment the if condition present in the last form.
    Your BDC program is done.
    Reward some points.
    Regards,
    Anomitro

  • BDC- Inconsistancy in table control for t-code MR21

    Hi all,
    We are facing inconsistency in the table control (number of line items) for t-code MR21 in normal transaction screen and BDC screen.
    In normal transaction run (MR21) we can see 12 line entries.
    But for the same t-code while processing of a session created by BDC recording we can see only 9 entries.
    Because of the mismatch in the lines, there will be a gap of 3 blank lines.
    Kindly provide any input to solve the issue.
    Thanks & Regards,
    Prabhu

    Hello,
    You will have to use the OPTIONS addition of CALL TRANSACTION to set the default screen size
    data: t_ctu type ctu_params.
    t_ctu-defsize = 'X'.
    t_ctu-dismode = 'N' .   " Mode
    t_ctu-upmode = 'S'  " Update
    call transaction 'MR21' using bdcdata options form t_ctu messages into t_messages.
    Vikranth

  • BDC for appending data for t-code FK02

    Hi,
    I want to append data for t-code FK02 through BDC.
    Like if for particular lifnr and bukrs, there is existing 2 line items
    then my BDC should starting appending data from 3rd line item.
    Thanks

    first u count line item
    select count(*) into cnt
               from LFBW as a
               where a~lifnr = itab-lifnr
                 and a~bukrs = itab-bukrs.
    then put logic for
    if cnt > '06'.
            tme = cnt / 6.
            cnt = cnt mod 6.
            do tme times.
                perform bdc_dynpro using 'SAPMF02K' '0610'.
                perform bdc_field using 'BDC_CURSOR' 'LFBW-QSREC(01)'.
                perform bdc_field using 'BDC_OKCODE' 'P+'.
            enddo.
        endif.

  • BDC for the t-code ZTASK

    I'm trying to create a BDC for the t-code ZTASK but the release status option wont let put it as REL it automatically makes it UDEV. Can anone tell me how to change this so that it works

    Try out BAPI method!
    Regards,
    Lalit Mohan Gupta.

  • Error while running a BDC for the Transaction F-02

    Hi,
           I'm getting an error <b><i>"Parking not possible during Batch Input"</i></b> while running a BDC for the transaction F-02.
           When i click on the error message it displays the message [b<i>]"In Customizing, you can control whether an error message is issued."</b></i>
            How to solve this issue?.
            Waiting for ur replies.........
    Regards
    N.Senthil

    Hi,
    When you are doing the recording in SHDB, and in the same screen where the TCODE to be recorded is given, there are options that you can choose called "Recording Parameters"...Select the checkbox which says "Not a Batch Input Session", this will set the sy-binpt variable to " "(in a recording by default it is "X")...and you will not get this error...
    Also make sure while writing the BDC program to make use of the "bdc options" parameter which has this property to switch of sy-binpt...
        Refer below theard for sample bdc code for f-02.
    https://forums.sdn.sap.com/click.jspa?searchID=5126766&messageID=1538409
    Regards

Maybe you are looking for

  • Facebook, google ERROR sec_error_unknown_issuer in Fresh Firefox 35 windows 8.1

    Windows 8.1 64-bit Firefox 35 (Latest) - Fresh Installed firefox 35 - Even refreshed Firefox with safe-mode - when opening page google.com, facebook.com (Attached Image) getting error page that should not be the error/exception. - This is not for the

  • R12 Installation on AIX (64) Dual Nodes

    Hi, I want to install Oracle Application R12 on AIX Dual Nodes. I have 2 servers on cluster, and my need is to install the database on 1 machine and the application on the other machine. How do i go about the installation? Thanks and Regards Shahrukh

  • Valuated stock problem in inventory.

    Hi all BI gurus ,   Iam working on Inventory module , I have loaded the data for it .       1. For 2lis_03_bx i.e initial stock we have data from 1999 to 2006 on R/3 side .       2. And we are loading the data from 2005 to 2006 for BW .   But  The va

  • Setup failure not recorded in Execution.ResultStatus

    If a step fails during the Setup section of my sequence, the result visible in a VB.NET event handler is "Passed", rather than the expected "Failed" or "Error". Private Sub ExecutionTwoFinished(ByVal sender As Object, ByVal e As NationalInstruments.T

  • Replacing the "No rows returned" message in Portlets

    Hi all, How to remove (or replace) the default message that comes in each Portlet if the query doesnot return anything ? By default the Portlet shows the message "No rows returned" , how to customize it or remove it. Ayman