I have problem in BDC program

Hi All,
i prepare one flat file, i select data from PROJ table passing PROJ-PSPID( Project Definition) based upon flat file.flat file contains Project Definition,WBS Element,Level,......
there is any Function Modules convert the flat file Input into Standard form.
for example : EM/AP09/NEW1 convert this into EM/AP09/NEW1000000000000.
give me suggistions.
Thanks.

Hi,
Please try with this function module.
KCD_EXCEL_OLE_TO_INT_CONVERT
hope it will useful.
Thanks
Hemant

Similar Messages

  • Problem in BDC program when executed using scheduled job

    I have developed a BDC program for J1I5 T-code whcih updates RG1 Register. This is working as expected when run in foreground as well as in background. But it is not giving expected results when scheduled in Job. It is not giving any error message, job is executed without error.
    What can be the problem? pls. help.
    Thanks!
    Prakash

    Hi,
    Thanks for reply.
    I have checked log using SM37, it is not showing any error.
    Log details are as follows...
    Date       Time     Message text                                                                             Message class Message no. Messag
    08.05.2010 11:47:10 Job started                                                                                00           516          S
    08.05.2010 11:47:10 Step 001 started (program ZSDB_J1I5_REG_UPDATE_BDC, variant 1101_1_RMA, user ID STK)      00           550          S
    08.05.2010 11:47:20 Job finished                                                                                00           517          S

  • Problem in BDC Program

    I have a problem while I am doing BDC program for Maintaining Quotation.i.e,I have Header data and Item Data.In Item data it has multiple items.For each item I have to give condition type in the table control(which has already pre-existed condition types),but I have to place new Condition type at the last line of the table control.

    Hi,
    In pricing element Table Control we have to pass condition type. For each material a set of condition types pre-exists, for us to pass condition types we have to capture index number which changes dynamically.
    We have to pass the index number to T_BDCDATA prior calling the transaction ME47 to append the condition type to the last line of the Pricing element table control which changes dynamically.

  • Dialog Box  Problem in BDC Program...

    Hi friends,
    I am facing a problem while  creating service entry sheet no  throgh bdc ( Tcode ML81N) . I use 'no disply' mode in call transaction method.
    whenever i regarding in our development client there is no dialog box with the following screen.  But in QAS server it displays the same. I have already include the following code in my bdc program. But the dialog box  been displayed finally. Our user doesn't require this interaction. Kindly give solutions.
    perform bdc_dynpro      using 'SAPLMLSR' '0110'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'IMKPF-BLDAT'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=OK'.
    perform bdc_transaction using 'ML81N'.
    Thanks & Regards,
    SP.Manavalan.

    Hi,
    Thanks for reply.
    I have checked log using SM37, it is not showing any error.
    Log details are as follows...
    Date       Time     Message text                                                                             Message class Message no. Messag
    08.05.2010 11:47:10 Job started                                                                                00           516          S
    08.05.2010 11:47:10 Step 001 started (program ZSDB_J1I5_REG_UPDATE_BDC, variant 1101_1_RMA, user ID STK)      00           550          S
    08.05.2010 11:47:20 Job finished                                                                                00           517          S

  • Problem in BDC program using MIGO_GO transaction code

    Hi Gurus
    I have developed a BDC session upload program. The program is
    running fine except for the issue that when it goes the subscreen in
    MIGO_GO transaction (same as MIGO) it does not generates any code
    for page down or next page key. While recording after 15 entries
    (end of page) it moves automaticaly to the next page on line 2 but
    when I have used my own itab to fill data into this screen it
    passes/generates the code for page down with clear screen. It does
    go to item 2 but overwrites earlier entries instead of generting new
    one.
    Any suggestions?
    Guys this is very urgent so need ur feedback immediately?
    Lots of thanks in advance.
    The code is as follows:
    PURPOSE: The purpose of this upload program is to upload
    receipt
    against Production Order. Data is uploaded into SAP
    via text
    file which is converted from pre-defined excel file
    pattern.
    REPORT zmm_migo_rec
    NO STANDARD PAGE HEADING LINE-SIZE 255.
    *Excel column sequence SAP Material Number Batch # Crop Year
    Process Date Net Weight Plant Area Gross
    Weight Plant Number Shift Mat.Desc Prod.Ord#
    TYPES : BEGIN OF st_barcode,
    m_matnr LIKE mara-matnr,
    m_batch_no LIKE mseg-charg,
    m_crop_year TYPE c LENGTH 4,
    m_process_date LIKE mkpf-bldat,
    m_net_wt TYPE c LENGTH 7,
    m_plant_area TYPE c LENGTH 5,
    m_gross_wt TYPE c LENGTH 7,
    m_plant_num TYPE c LENGTH 1,
    m_shift TYPE c LENGTH 1,
    m_matnr_desc TYPE c LENGTH 30,
    m_prod_ord LIKE mseg-aufnr,
    text(200),
    text1(200),
    END OF st_barcode.
    DATA : itab_barcode TYPE TABLE OF st_barcode WITH HEADER LINE.
    DATA : itab_log TYPE TABLE OF st_barcode WITH HEADER LINE.
    DATA : itab_log1 TYPE TABLE OF st_barcode WITH HEADER LINE.
    DATA : g_filename TYPE rlgrap-filename.
    INCLUDE bdcrecx1.
    Start of Selection Screen for document data, screen data and
    posting date fields.
    SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-000.
    PARAMETERS :
    p_dummy TYPE i DEFAULT 0,
    p_bldat LIKE sy-datum OBLIGATORY DEFAULT sy-
    datum, "Document date
    p_budat LIKE sy-datum OBLIGATORY DEFAULT sy-
    datum, "Posting date
    p_frmplt LIKE t001l-werks OBLIGATORY,
    p_frmloc LIKE t001l-lgort OBLIGATORY,
    p_toloc LIKE t001l-lgort OBLIGATORY,
    p_rsnmov LIKE mseg-grund OBLIGATORY,
    p_bsarea LIKE mseg-gsber OBLIGATORY,
    cb_simul AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF BLOCK a1.
    START-OF-SELECTION.
    *to remove unnecessary fields from selection screen
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF screen-group4 LT '060' AND screen-group3 NE 'BLK'.
    screen-active = 0.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    *to Process Call Transaction in Error Mode
    ctu = 'X'.
    ctumode = 'A'.
    nodata = space.
    END-OF-SELECTION.
    Get data from file
    PERFORM f_get_data.
    Validate data retrieved from excel file
    PERFORM f_validate_data.
    Batch data / simulate.
    IF cb_simul IS INITIAL.
    PERFORM f_prized_data.
    PERFORM f_write_log.
    ELSE.
    PERFORM f_write_log.
    ENDIF.
    *& Form F_GET_DATA
    This module is used to read text file data into SAP itab.
    FORM f_get_data .
    Select the file to be uploaded
    CALL FUNCTION 'UPLOAD'
    EXPORTING
    filename = g_filename
    filetype = 'DAT'
    TABLES
    data_tab = itab_barcode
    EXCEPTIONS
    conversion_error = 1
    invalid_table_width = 2
    invalid_type = 3
    no_batch = 4
    unknown_error = 5
    gui_refuse_filetransfer = 6
    OTHERS = 7.
    ENDFORM. " F_GET_DATA
    *& Form F_VALIDATE_DATA
    text
    FORM f_validate_data .
    DATA : BEGIN OF lt_marc OCCURS 0,
    matnr LIKE mard-matnr,
    werks LIKE mard-werks, " Plant
    END OF lt_marc.
    RANGES : lr_matnr FOR mara-matnr.
    READ TABLE itab_barcode INDEX 1.
    Prepare Ranges to check/verify Material from Table MARD i.e.
    respective plant
    lr_matnr-sign = 'I'.
    lr_matnr-option = 'EQ'.
    LOOP AT itab_barcode.
    Add leading zeros incase of numeric value.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = itab_barcode-m_matnr
    IMPORTING
    output = itab_barcode-m_matnr.
    lr_matnr-low = itab_barcode-m_matnr.
    APPEND lr_matnr.
    MODIFY itab_barcode TRANSPORTING m_matnr.
    ENDLOOP.
    IF NOT lr_matnr[] IS INITIAL.
    SORT lr_matnr BY low.
    DELETE ADJACENT DUPLICATES FROM lr_matnr COMPARING low.
    SELECT matnr werks FROM marc
    INTO TABLE lt_marc
    WHERE matnr IN lr_matnr AND
    werks = p_frmplt.
    ENDIF.
    LOOP AT itab_barcode.
    READ TABLE lt_marc
    WITH KEY matnr = itab_barcode-m_matnr
    werks = p_frmplt.
    IF sy-subrc <> 0 .
    CONCATENATE 'Material' itab_barcode-m_matnr
    ' does not exist in Plant ' p_frmplt
    INTO itab_barcode-text SEPARATED BY space.
    MOVE-CORRESPONDING itab_barcode TO itab_log.
    APPEND itab_log.
    MODIFY itab_barcode TRANSPORTING text.
    CONTINUE.
    ENDIF.
    ENDLOOP.
    ENDFORM. " F_VALIDATE_DATA
    *& Form F_WRITE_LOG
    text
    FORM f_write_log .
    LOOP AT itab_log.
    WRITE :/ itab_log-text.
    ENDLOOP.
    LOOP AT itab_log1.
    WRITE :/ itab_log1-text1.
    ENDLOOP.
    ENDFORM. " F_WRITE_LOG
    *& Form f_prized_data
    text
    --> p1 text
    <-- p2 text
    FORM f_prized_data.
    DATA: ld_lines LIKE sy-tabix,
    ld_sw TYPE i,
    lh_loop TYPE i,
    ld_recno TYPE i,
    lremain TYPE i,
    ld_total TYPE i,
    ld_counter LIKE sy-index,
    ld_counter TYPE i,
    ld_save LIKE sy-index,
    ld_last TYPE i,
    sc_counter(2) TYPE n,
    ld_budat(10),
    ld_bldat(10).
    DATA: wa_matnr(40) TYPE c,
    wa_bwtar(40) TYPE c,
    wa_erfme(40) TYPE c,
    wa_charg(40) TYPE c.
    WRITE: p_budat TO ld_budat,
    p_bldat TO ld_bldat.
    ld_recno = 300. " Number of records in the upload file.
    ld_last = 0.
    Open BDC session.
    PERFORM open_group.
    DESCRIBE TABLE itab_barcode LINES ld_lines.
    CLEAR: lh_loop, lremain.
    lh_loop = ld_lines DIV ld_recno.
    lremain = ld_lines MOD ld_recno.
    IF lremain > 0.
    lh_loop = lh_loop + 1.
    ENDIF.
    ld_sw = 1.
    LOOP AT itab_barcode.
    ADD 1 TO ld_counter.
    ADD 1 TO sc_counter.
    ADD 1 TO ld_total. " Check for 300
    IF ld_sw = 1.
    Header data.
    PERFORM open_group.
    PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '=MIGO_OK_ACTION'.
    PERFORM bdc_field
    USING 'BDC_CURSOR' 'GODYNPRO-ACTION'.
    PERFORM bdc_field USING 'GODYNPRO-
    ACTION' 'A01'.
    PERFORM bdc_field USING 'GODYNPRO-
    REFDOC' 'R02'.
    PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '=OK_GO'.
    PERFORM bdc_field USING 'GODYNPRO-
    ACTION' 'A01'.
    PERFORM bdc_field USING 'GODYNPRO-
    REFDOC' 'R08'.
    PERFORM bdc_field USING 'GODEFAULT_TV-
    BWART' '101'.
    PERFORM bdc_field
    USING 'BDC_CURSOR' 'GODYNPRO-
    ORDER_NUMBER'.
    PERFORM bdc_field USING 'GOHEAD-
    BLDAT' ld_bldat.
    PERFORM bdc_field USING 'GOHEAD-
    BUDAT' ld_budat.
    PERFORM bdc_field USING 'GOHEAD-
    XNAPR' 'X'.
    PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '=MIGO_OK_DETAIL_OP
    EN'.
    PERFORM bdc_field USING 'GODYNPRO-
    ACTION' 'A01'.
    PERFORM bdc_field USING 'GODYNPRO-
    REFDOC' 'R08'.
    PERFORM bdc_field USING 'GODEFAULT_TV-
    BWART' '101'.
    PERFORM bdc_field
    USING 'BDC_CURSOR' 'GODYNPRO-
    ORDER_NUMBER'.
    PERFORM bdc_field USING 'GOHEAD-
    BLDAT' ld_bldat.
    PERFORM bdc_field USING 'GOHEAD-
    BUDAT' ld_budat.
    PERFORM bdc_field USING 'GOHEAD-
    XNAPR' 'X'.
    PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '=OK_GO'.
    PERFORM bdc_field USING 'GODYNPRO-
    ACTION' 'A01'.
    PERFORM bdc_field USING 'GODYNPRO-
    REFDOC' 'R08'.
    PERFORM bdc_field USING 'GODEFAULT_TV-
    BWART' '101'.
    PERFORM bdc_field
    USING 'BDC_CURSOR' 'GODYNPRO-
    ORDER_NUMBER'.
    PERFORM bdc_field USING 'GODYNPRO-
    ORDER_NUMBER' itab_barcode-m_prod_ord.
    PERFORM bdc_field USING 'GOHEAD-
    BLDAT' ld_bldat.
    PERFORM bdc_field USING 'GOHEAD-
    BUDAT' ld_budat.
    PERFORM bdc_field USING 'GOHEAD-
    XNAPR' 'X'.
    PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '=MIGO_OK_LINE_CLIC
    K'.
    PERFORM bdc_field USING 'GODEFAULT_TV-
    BWART' '101'.
    PERFORM bdc_field USING 'GOHEAD-
    BLDAT' ld_bldat.
    PERFORM bdc_field USING 'GOHEAD-
    BUDAT' ld_budat.
    PERFORM bdc_field USING 'GOHEAD-
    XNAPR' 'X'.
    PERFORM bdc_field USING 'GOHEAD-
    WEVER' '3'.
    PERFORM bdc_field
    USING 'BDC_CURSOR' 'GOITEM-ZEILE(01)'.
    PERFORM bdc_field USING 'GODYNPRO-
    DETAIL_ZEILE' ' 1'.
    PERFORM bdc_field USING 'GOITEM-
    ERFME' 'KG'.
    PERFORM bdc_field USING 'GOITEM-
    BWART' '101'.
    PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '=MIGO_OK_SPLIT_QUA
    N'.
    PERFORM bdc_field USING 'GODEFAULT_TV-
    BWART' '101'.
    PERFORM bdc_field USING 'GOHEAD-
    BLDAT' ld_bldat.
    PERFORM bdc_field USING 'GOHEAD-
    BUDAT' ld_budat.
    PERFORM bdc_field USING 'GOHEAD-
    XNAPR' 'X'.
    PERFORM bdc_field USING 'GOHEAD-
    WEVER' '3'.
    PERFORM bdc_field
    USING 'BDC_CURSOR' 'GOITEM-ZEILE(01)'.
    PERFORM bdc_field USING 'GODYNPRO-
    DETAIL_ZEILE' ' 1'.
    PERFORM bdc_field USING 'GOITEM-
    ERFME' 'KG'.
    PERFORM bdc_field USING 'GOITEM-
    MIGO_ELIKZ' '1'.
    PERFORM bdc_field USING 'GOITEM-
    BWART' '101'.
    ld_sw = 0.
    ENDIF.
    IF sc_counter = 16.
    CLEAR sc_counter.
    PERFORM bdc_field USING 'BDC_OKCODE' 'DOWN'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '/00'.
    add 2 to sc_counter.
    ELSE.
    PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
    ENDIF.
    CLEAR wa_matnr.
    CONCATENATE 'GOSPLIT-ERFMG(' sc_counter ')' INTO wa_matnr.
    CLEAR wa_bwtar.
    CONCATENATE 'GOSPLIT-CHARG(' sc_counter ')' INTO wa_bwtar.
    PERFORM bdc_dynpro USING 'SAPLMIGO' '1000'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '=OK_SP_CH'.
    PERFORM bdc_field
    USING 'BDC_CURSOR' 'GOSPLIT-CHARG
    (sc_counter)'.
    PERFORM bdc_field USING wa_matnr itab_barcode-
    m_gross_wt.
    PERFORM bdc_field USING wa_bwtar itab_barcode-
    m_batch_no.
    PERFORM bdc_field
    USING 'BDC_CURSOR' 'GOSPLIT-CHARG
    (sc_counter)'.
    *When end of itab
    AT LAST.
    PERFORM bdc_dynpro USING 'SAPLMIGO' '1000'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '=OK_GOON'.
    PERFORM bdc_field
    USING 'BDC_CURSOR' 'GOSPLIT-CHARG
    (sc_counter)'.
    PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '=MIGO_OK_NEXT_IT'.
    PERFORM bdc_field USING 'GODEFAULT_TV-
    BWART' '101'.
    PERFORM bdc_field USING 'GOHEAD-
    BLDAT' ld_bldat.
    PERFORM bdc_field USING 'GOHEAD-
    BUDAT' ld_budat.
    PERFORM bdc_field USING 'GOHEAD-
    XNAPR' 'X'.
    PERFORM bdc_field USING 'GOHEAD-
    WEVER' '3'.
    PERFORM bdc_field
    USING 'BDC_CURSOR' 'GOITEM-ZEILE(01)'.
    PERFORM bdc_field USING 'GODYNPRO-
    DETAIL_ZEILE' ' 1'.
    PERFORM bdc_field USING 'GOITEM-
    ERFME' 'KG'.
    PERFORM bdc_field USING 'GOITEM-
    MIGO_ELIKZ' '1'.
    PERFORM bdc_field USING 'GOITEM-
    BWART' '101'.
    PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '=MIGO_OK_TAKE_VALU
    E'.
    PERFORM bdc_field USING 'GODEFAULT_TV-
    BWART' '101'.
    PERFORM bdc_field USING 'GOHEAD-
    BLDAT' ld_bldat.
    PERFORM bdc_field USING 'GOHEAD-
    BUDAT' ld_budat.
    PERFORM bdc_field USING 'GOHEAD-
    XNAPR' 'X'.
    PERFORM bdc_field
    USING 'BDC_CURSOR' 'GOITEM-TAKE_IT
    (01)'.
    PERFORM bdc_field USING 'GOITEM-TAKE_IT
    (01)' 'X'.
    PERFORM bdc_field USING 'GODYNPRO-
    DETAIL_ZEILE' ' 1'.
    PERFORM bdc_field USING 'GOITEM-
    ERFME' 'KG'.
    PERFORM bdc_field USING 'GOITEM-
    MIGO_ELIKZ' '1'.
    PERFORM bdc_field USING 'GOITEM-
    BWART' '101'.
    PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '=OK_CHECK'.
    PERFORM bdc_field USING 'GODEFAULT_TV-
    BWART' '101'.
    PERFORM bdc_field USING 'GOHEAD-
    BLDAT' ld_bldat.
    PERFORM bdc_field USING 'GOHEAD-
    BUDAT' ld_budat.
    PERFORM bdc_field USING 'GOHEAD-
    XNAPR' 'X'.
    PERFORM bdc_field
    USING 'BDC_CURSOR' 'GOITEM-TAKE_IT
    (01)'.
    PERFORM bdc_field USING 'GODYNPRO-
    DETAIL_ZEILE' ' 1'.
    PERFORM bdc_field USING 'GOITEM-
    ERFME' 'KG'.
    PERFORM bdc_field USING 'GOITEM-
    MIGO_ELIKZ' '1'.
    PERFORM bdc_field USING 'GOITEM-
    BWART' '101'.
    PERFORM bdc_field USING 'GODYNPRO-
    DETAIL_TAKE' 'X'.
    PERFORM bdc_dynpro USING 'SAPMSSY0' '0120'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '=&ONT'.
    PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '=OK_POST1'.
    PERFORM bdc_field USING 'GODEFAULT_TV-
    BWART' '101'.
    PERFORM bdc_field USING 'GOHEAD-
    BLDAT' ld_bldat.
    PERFORM bdc_field USING 'GOHEAD-
    BUDAT' ld_budat.
    PERFORM bdc_field USING 'GOHEAD-
    XNAPR' 'X'.
    PERFORM bdc_field
    USING 'BDC_CURSOR' 'GOITEM-TAKE_IT
    (01)'.
    PERFORM bdc_field USING 'GODYNPRO-
    DETAIL_ZEILE' ' 1'.
    PERFORM bdc_field USING 'GOITEM-
    ERFME' 'KG'.
    PERFORM bdc_field USING 'GOITEM-
    MIGO_ELIKZ' '1'.
    PERFORM bdc_field USING 'GOITEM-
    BWART' '101'.
    PERFORM bdc_field USING 'GODYNPRO-
    DETAIL_TAKE' 'X'.
    PERFORM bdc_transaction USING 'MIGO_GO'.
    ENDAT.
    ENDLOOP.
    PERFORM close_group.
    ENDFORM. "f_prized_data

    Hi
    Thanks Peram for your swift reply but I am a newbie to BAPIs ...... is there anyway i can do this from within the code i had written ....
    for BAPIs I have to do R & D in detail and I need to complete this urgently. If BAPI is the only solution kindly provide my some quick guideline to proceed.
    Thanks,
    Imran

  • I have a eMac PowerMac4 and use quarkXpress (v 5) and filmaker pro 6 (v 1) and will be purchasing a new iMac soon. Will I have problems using these programs?

    I currently have an eMac and will be buying a new iMac soon and need to use the QuarkXpress (have v. 5) and FileMakerPro (have 6 v. 1) software for a current formatted newsletter I produce. While I can get the latest version of FileMaker pre-installed by Apple, Quark is no longer available at Apple. If I purchase QuarkXpress 8 (I have read there are problems with v. 9), will I be able to add my current files to the iMac and have everything work?  Thanks.

    I found that the QuarkXPress (v. 5) has the ability to Export and Save As....
    I tried save as, but didn't see any way to have it saved as anything other than the Quark.
    I also have found this in a apple forum:
    This solved my questionRe: Will Quark 7.5 work with the new Lion upgrade?
    Aug 31, 2011 7:35 AM (in response to machttps)
    Have just installed Lion and Quark 7.5 works well plus Adobe CS3 with the Java Run updates etc very pleased with the new Lion from Appple.
    I don't understand how this poster could get Quark to work on Lion, I thought I read Quark requires rosetta to run it (or maybe the Fix for the end of August took care of that). However, this person had the 7.5 already, but I can only upgrade to a certain level while in Tiger, so this apparently is where the problem arises (?).
    I also have come across a disc to update Quark to 5.01, but that's not much I suppose.
    Any help is GREATLY appreciated!

  • BDC program is not working in BI Production.

    Dear All,
    My BDC program for RSA1 is working fine in BI Development, but it is not working in BI Production. I have debug the BDC program and found that data is coming from the excel file. Then why it is not working. Please help me.
    Thanks,
    With regards,
    Rosaline.

    Hi all, the problem is now solved.
    With regards,
    Rosaline.

  • How to Increment the Page in transaction using BDC program

    Hi Friends,
    I am facing Page up problem in BDC program,
    In CT02 transaction, we have to upload mass data for the characterisitic, in the screen we can able to upload 7 rows (actually 7 rows ar there in the transaction) even after doing the Page up (P+) in the BDC, still that overwirtes in the existing rows. How to solve this issue.
    Thanks in advance.
    Here i have attached the Program, For you reference.
      LOOP AT ITAB.
        ATNAME = ITAB-ATNAM.
        perform bdc_dynpro      using 'SAPMCTAV' '0100'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'CABN-ATNAM'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=WERT'.
        perform bdc_field       using 'CABN-ATNAM'
                                       ITAB-ATNAM.
        rows = counter MOD 7.
        IF rows EQ 0.
          PERFORM bdc_dynpro      using 'SAPLCTMV' '0200'.
          PERFORM bdc_field       USING 'BDC_OKCODE' 'P+'.
          counter = '02'.
          PERFORM bdc_dynpro      using 'SAPLCTMV' '0200'.
        ENDIF.
        CONCATENATE 'CAWNT-ATWTB(' COUNTER ')' INTO var.
        CONCATENATE 'CAWN-ATWRT(' COUNTER ')' INTO var1.
        perform bdc_dynpro      using 'SAPLCTMV' '0200'.
        perform bdc_field       using 'BDC_CURSOR'
                                       var.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=SICH'.
        perform bdc_field       using var
                                      ITAB-ATWTB.
        perform bdc_field       using var1
                                      ITAB-ATWRT.
        COUNTER = COUNTER + '01'.
        opt-defsize = 'X'.
        opt-dismode = 'A'.
        opt-updmode = 'S'.
        CALL TRANSACTION 'CT02' USING
        bdcdata OPTIONS FROM opt MESSAGES
        INTO it_mess.
        REFRESH bdcdata.
      ENDLOOP.
    Regards
    Shankar

    Hi Geeta Yash,
    Thanks for ur timely help.
    But we have done it thro 'P+'
    Thanks.
    Shankar

  • Problem in BDC for F-32

    Hi Experts,
    I m facing a problem while doing the BDC for F-32, i want to make Normal OI check field as Uncheck  through BDC , while recording i have uncheck the check box and the field value appears to be ' ' in the recording , but when i process the BDC the field remains CHECKED by Default.
    pls help how can i unchecked the field.
    I have tried it by puting the value of the field 'X' also but still it remains checked .
    pls help me how can i UNCHECKED the Normal OI  screen field .

    Hi
    The output format of an amonut is managed by the currency, you shouldn't have any particular problem,
    In BDC program the field to be used to transfer the amount has to be char, so probably the easier solution is to write it into the bdc field in according to the currency:
    WRITE <AMOUNT> CURRENCY <CUURENCY> TO <BDC FIELD>.
    Max

  • Problem in BDC for F-02 -- Currency Problem

    Dear Experts,
    I have written a BDC for F-02 to upload the opening balances of vendors.
    Problem is , this BDC is for Libya country,  where decimal places is 3.
    Now when i run my BDC, if the amount is  22.54, it will upload it as 22.540, which is ok, but if the amount is 22.543, it upload it as 22.540 instead of 22.543.
    can one provide some guidance in this....
    Regards,
    Maverick

    Hi
    The output format of an amonut is managed by the currency, you shouldn't have any particular problem,
    In BDC program the field to be used to transfer the amount has to be char, so probably the easier solution is to write it into the bdc field in according to the currency:
    WRITE <AMOUNT> CURRENCY <CUURENCY> TO <BDC FIELD>.
    Max

  • Query on bdc program

    hi friends,
                   I really have doubt on bdc program. I wantedto complete this task.
    1.  Create a BDC program for the following
      - Read a flat file containing Vendor Master details (keep the record structure as simple as possible).  The file should contain a list of Vendors to be created in the SAP system.
      - Using BDC technique, create the Vendor master using FK01 transaction
      - Repeat the steps for creating all Vendors listed in the file.  For each transaction, print out if the BDC was successful or not, and if successful print out the Vendor Number that was created.
    but nothing is woking out.
    I jus wnated to know what was my mistake.
    I would provide my screen shots with expalnations for each and ery step.
    Kindly please anyone of help me to know my mistake and to get the program done. i need to finish this by today since theres a lot of pressure in my work place.
    Pls provide me ur mail id to send my documents as attachmnents..
    I would be very thankful for your timely help.
    Thanks in advance
    rinky123

    I have tested your program up to the BDC part, looks like you program is uploading the data and putting it in to the RECORD internal table correctly.  This leads me to believe that the problem is in the BDC code itself.  As Srinivas has suggested, run the program with mode "A".  You can set this in the selection screen.  Currently it is mode "N".  Mode "A" will allow you to see all of the steps that the BDC is doing and you can find out what the error is at that time.
    Regards,
    Rich Heilman

  • BDC programs affected after system copy.

    Dear All,
    We are facing a problem after system copy with regards to the HR module.
    Client have created a BDC programs and it was running fine in the old server.
    After the system refresh, one of the BDC is having problem and following is the brief,
    1. While running a user transaction in FOREGROUND, the program is running correctly and in BACKGROUND the program is calling some other action which is not recorded in the BDC. One observation was made that, while running in DEBUG mode, with the background option, the program runs correctly.
    2. In program we are calling 2 PA40 actions, whose sequence no. are 28 and 61 resp. In background mode the program calling some other PA40 action whose seq no is 22.
    Is there anything we are missing in the profile or some settings in the applications to run the BDC program correctly?
    Regards
    Pras

    No, I haven't run that transaction.
    I have checked the old server, and the logical system is PRDCABS500 and the same is present in the new system.
    But I am amaze that the other BDC's are working fine, just 1-2 bdc are having problems?
    I have checked BD54 in new system its still showing the old..
    What do you recommend and when should this activity to be done( I information says that no users should be present?).
    Edited by: Prashant Dhas on Jun 13, 2008 7:05 AM

  • BDC PROGRAM FOR F-02 ERROR

    Hi ,
    i have written a bdc program for f-02 .here we have 2 posting keys 31 and 40 .when i recored in shdb i can see when i use 31 posting key then i get 302 screen and when i use 40 posting key then i get 300 screen.But the problem is in 302 screen we have new posting keys and new account numbers .how to update these . here is my code . my file is not getting updated when i get screen 302 .Any advice?
    REPORT zfip0009 NO STANDARD PAGE HEADING.
    TABLES ska1.
    DATA: BEGIN OF bdcdata OCCURS 0.
            INCLUDE STRUCTURE bdcdata.
    DATA: END OF bdcdata.
    DATA w_date(10) TYPE c.
    DATA w_first  TYPE c.
    DATA w_second TYPE c.
    data from flat file
    DATA: BEGIN OF t_data OCCURS 0,
           bukrs LIKE bkpf-bukrs,    "company code
           newbs LIKE rf05a-newbs,   "Posting Key
           newko LIKE rf05a-newko,   "New account number(SAP)
           wrbtr(13) TYPE c,         "amount
           dmbtr(13) TYPE c,         "sterling local amount  "+MW1
           mwskz LIKE bseg-mwskz,    "Tax code
           sgtxt LIKE bseg-sgtxt,    "item description
           kostl LIKE cobl-kostl,    "Cost centre
           ps_posid LIKE cobl-ps_posid, "WBS number
           aufnr LIKE cobl-aufnr,     "Internal order
          END OF t_data.
            SELECTION SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_file LIKE rlgrap-filename
                DEFAULT 'C:\temp\XSL.txt'.
    SELECTION-SCREEN SKIP.
    PARAMETERS: p_sess(12) DEFAULT 'GLPOSTING'.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS: p_bldat LIKE bkpf-bldat,
                p_budat LIKE bkpf-budat,
                p_blart LIKE bkpf-blart,
                p_monat LIKE bkpf-monat,
               p_bukrs LIKE bkpf-bukrs,
                p_bktxt LIKE bkpf-bktxt,
                p_xblnr LIKE bkpf-xblnr,
                p_waers LIKE bkpf-waers.
    SELECTION-SCREEN END OF BLOCK b2.
    *SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    *PARAMETERS p_ktopl LIKE ska1-ktopl.
    *SELECTION-SCREEN END OF BLOCK b3.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'WS_FILENAME_GET'
          EXPORTING
               def_filename     =  p_file
              DEF_PATH         = ' '
               mask             = ',.,..'
              MODE             = ' '
              TITLE            = ' '
          IMPORTING
               filename         = p_file
              RC               =
           EXCEPTIONS
                inv_winsys       = 1
                no_batch         = 2
                selection_cancel = 3
                selection_error  = 4
                OTHERS           = 5.
          START OF SELECTION
    START-OF-SELECTION.
    Get all of the information held on the spreadsheets.
      CALL FUNCTION 'WS_UPLOAD'
        EXPORTING
          filename = p_file
          filetype = 'DAT'
        TABLES
          data_tab = t_data
        EXCEPTIONS
          OTHERS   = 1.
      IF sy-subrc <> 0.
        WRITE :/ 'Failed to Open Input file', p_file.
        EXIT.
      ENDIF.
      REFRESH bdcdata.
      CALL FUNCTION 'BDC_OPEN_GROUP'
        EXPORTING
          client = sy-mandt
          group  = p_sess
          user   = sy-uname
          keep   = 'X'.
      PERFORM load_bdcdata.
      CALL FUNCTION 'BDC_CLOSE_GROUP'.
      WRITE: /
    'Batch input session', p_sess, 'created: process session via SM35'.
    END-OF-SELECTION.
    *&      Form  LOAD_BDCDATA
          Load the BDCDATA fields depending
    FORM load_bdcdata.
      CLEAR: w_first, w_second.
      CLEAR bdcdata.
      LOOP AT t_data.
        IF sy-tabix = 1.
          PERFORM bdc_dynpro      USING 'SAPMF05A' '0100'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'RF05A-NEWKO'.
          PERFORM format_date USING p_bldat.
          PERFORM bdc_field       USING 'BKPF-BLDAT'
                                        w_date.
          PERFORM bdc_field       USING 'BKPF-BLART'
                                        p_blart.
          PERFORM bdc_field       USING 'BKPF-BUKRS'
                                        t_data-bukrs.
          PERFORM format_date USING p_budat.
          PERFORM bdc_field       USING 'BKPF-BUDAT'
                                        w_date.
          PERFORM bdc_field       USING 'BKPF-WAERS'
                                        p_waers.
          PERFORM bdc_field       USING 'BKPF-MONAT'
          PERFORM bdc_field       USING 'BKPF-BKTXT'
                                        p_bktxt.
          PERFORM bdc_field       USING 'BKPF-XBLNR'
                                        p_xblnr.
          PERFORM bdc_field       USING 'RF05A-NEWBS'
                                        t_data-newbs.
          PERFORM bdc_field       USING 'RF05A-NEWKO'
                                        t_data-newko.
        ELSE.
          PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'RF05A-NEWKO'.
          PERFORM bdc_field       USING 'RF05A-NEWBS'
                                        t_data-newbs.
          PERFORM bdc_field       USING 'RF05A-NEWKO'
                                        t_data-newko.
          PERFORM bdc_field       USING 'RF05A-NEWBK'
                                        t_data-bukrs.
          PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
          PERFORM bdc_field       USING 'BDC_OKCODE' 'ENTE'.
        ENDIF.
       IF t_data-newbs = '31' .
          w_second = '1'.
          PERFORM bdc_dynpro      USING 'SAPMF05A' '0302'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                              '/00'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                     'BSEG-SGTXT'.
          PERFORM bdc_field       USING 'BSEG-WRBTR'
                                      t_data-wrbtr.
          PERFORM bdc_field       USING 'BSEG-SGTXT'
                                     t_data-sgtxt.
        PERFORM bdc_field       USING 'RF05A-NEWBS'
                                       t_data-newbs.
        PERFORM bdc_field       USING 'RF05A-NEWKO'
                                       t_data-newko.
            IF NOT t_data-kostl IS INITIAL.
            PERFORM bdc_field       USING 'COBL-KOSTL'
                                          t_data-kostl.
          ELSEIF NOT t_data-ps_posid IS INITIAL.
            PERFORM bdc_field       USING 'COBL-PS_POSID'
                                          t_data-ps_posid.
          ELSEIF NOT t_data-aufnr IS INITIAL.
            PERFORM bdc_field       USING 'COBL-AUFNR'
                                          t_data-aufnr.
          ENDIF.
    *...start of Amendment MW1
          IF p_waers ne 'GBP'.
            PERFORM bdc_field       USING 'BSEG-DMBTR'
                                              t_data-dmbtr.
          ENDIF.
        ENDIF.
    *...end of Amendment MW1  ENDIF.
       IF t_data-newbs = '40'    .
          PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                     'BSEG-SGTXT'.
          PERFORM bdc_field       USING 'BSEG-WRBTR'
                                      t_data-wrbtr.
          PERFORM bdc_field       USING 'BSEG-SGTXT'
                                     t_data-sgtxt.
           PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
          PERFORM bdc_field       USING 'BDC_OKCODE' 'ENTE'.
             IF NOT t_data-kostl IS INITIAL.
            PERFORM bdc_field       USING 'COBL-KOSTL'
                                          t_data-kostl.
          ELSEIF NOT t_data-ps_posid IS INITIAL.
            PERFORM bdc_field       USING 'COBL-PS_POSID'
                                          t_data-ps_posid.
          ELSEIF NOT t_data-aufnr IS INITIAL.
            PERFORM bdc_field       USING 'COBL-AUFNR'
                                          t_data-aufnr.
          ENDIF.
          PERFORM bdc_field       USING 'BSEG-MWSKZ'
                                     t_data-mwskz.
    *...start of Amendment MW1
          IF p_waers ne 'GBP'.
            PERFORM bdc_field       USING 'BSEG-DMBTR'
                                              t_data-dmbtr.
          ENDIF.
    *...end of Amendment MW1
        ENDIF.
        AT FIRST.
    calculate the tax
          PERFORM bdc_field       USING 'BKPF-XMWST' 'X'.
        ENDAT.
      IF t_data-newbs = '40'     .
         PERFORM bdc_field       USING 'DKACB-FMORE'
                                       'X'.
         PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
         PERFORM bdc_field       USING 'BDC_OKCODE'
                                       'ENTE'.
         IF NOT t_data-kostl IS INITIAL.
           PERFORM bdc_field       USING 'COBL-KOSTL'
                                         t_data-kostl.
         ELSEIF NOT t_data-ps_posid IS INITIAL.
           PERFORM bdc_field       USING 'COBL-PS_POSID'
                                         t_data-ps_posid.
         ELSEIF NOT t_data-aufnr IS INITIAL.
           PERFORM bdc_field       USING 'COBL-AUFNR'
                                         t_data-aufnr.
         ENDIF.
       ENDIF.
      ENDLOOP.
      IF w_second = '1'.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0302'.
      ELSE.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
      ENDIF.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    'BU'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'BSEG-WRBTR'.
      PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    'ENTE'.
      CALL FUNCTION 'BDC_INSERT'
        EXPORTING
          tcode     = 'F-02'
        TABLES
          dynprotab = bdcdata.
      REFRESH bdcdata.
      CLEAR bdcdata.
    ENDFORM.                    " LOAD_BDCDATA
    Start of screen
    FORM bdc_dynpro USING program dynpro.
      CLEAR bdcdata.
      bdcdata-program  = program.
      bdcdata-dynpro   = dynpro.
      bdcdata-dynbegin = 'X'.
      APPEND bdcdata.
    ENDFORM.                    "BDC_DYNPRO
           insert field
    FORM bdc_field USING fnam fval.
      CLEAR bdcdata.
      bdcdata-fnam = fnam.
      bdcdata-fval = fval.
      APPEND bdcdata.
    ENDFORM.                    "BDC_FIELD
    *&      Form  format_date
          text
    FORM format_date  USING    p_date.
      CLEAR w_date.
      w_date(2) = p_date+6(2).
      w_date+2(1) = '.'.
      w_date3(2) = p_date4(2).
      w_date+5(1) = '.'.
      w_date+6(4) = p_date(4).
    ENDFORM.                    " format_date

    IF item-newbs = '09'
             OR item-newbs = '19'
             OR item-newbs = '29'
             OR item-newbs = '39'.
            IF item-newum = 'A' OR
             item-newum = 'V' OR
             item-newum = '1' OR
             item-newum = '2' OR
             item-newum = '3' OR
             item-newum = '5' OR
             item-newum = '6' OR
             item-newum = 'B' .
              PERFORM bdc_dynpro      USING 'SAPMF05A' '0304'.
              PERFORM bdc_field       USING 'BDC_CURSOR'
                                            'RF05A-NEWUM'.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                            '/00'.
              PERFORM bdc_field       USING 'BSEG-WRBTR'
                                            item-wrbtr.
              PERFORM bdc_field       USING 'BSEG-gsber'
                                            item-gsber.
              PERFORM bdc_field       USING 'BSEG-PRCTR'
                                            item-prctr.
              PERFORM bdc_field       USING 'BSEG-ZFBDT'
                                            item-zfbdt1.
              PERFORM bdc_field       USING 'BSEG-ZUONR'
                                            item-zuonr.
              PERFORM bdc_field       USING 'BSEG-SGTXT'
                                            item-sgtxt.
              IF idx1 = '002' .
                EXIT.
              ENDIF.
              idx = idx + 1.
              READ TABLE item INDEX idx .
              PERFORM bdc_field       USING 'RF05A-NEWBS'
                                            item-newbs.
              PERFORM bdc_field       USING 'RF05A-NEWKO'
                                            item-newko.
              PERFORM bdc_field       USING 'RF05A-NEWUM'
                                            item-newum.
              PERFORM bdc_field       USING 'RF05A-NEWBW'
                                            item-newbw.
              CONTINUE.
            ENDIF.
          ENDIF.
          IF item-newbs = '09'
             OR item-newbs = '19'
             OR item-newbs = '29'
             OR item-newbs = '39' .
            IF item-newum = 'H'
              OR item-newum = '4'
           OR item-newum = '6'
           OR item-newum = '7'
              OR item-newum = '8'
              OR item-newum = '9'
              OR item-newum = 'C'
              OR item-newum = 'D'
              OR item-newum = 'E'
              OR item-newum = 'I'
              OR item-newum = 'K'
              OR item-newum = 'L'
              OR item-newum = 'M'
              OR item-newum = 'O'
              OR item-newum = 'Q'
              OR item-newum = 'R'
              OR item-newum = 'T'
              OR item-newum = 'U'.
              PERFORM bdc_dynpro      USING 'SAPMF05A' '0303'.
              PERFORM bdc_field       USING 'BDC_CURSOR'
                                            'RF05A-NEWKO'.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                            '/00'.
              PERFORM bdc_field       USING 'BSEG-WRBTR'
                                            item-wrbtr.
              PERFORM bdc_field       USING 'BSEG-GSBER'
                                            item-gsber.
              PERFORM bdc_field       USING 'BSEG-ZFBDT'
                                            item-zfbdt1.
              PERFORM bdc_field       USING 'BSEG-ZUONR'
                                            item-zuonr.
              PERFORM bdc_field       USING 'BSEG-SGTXT'
                                            item-sgtxt.
              IF idx1 = '002' .
                EXIT.
              ENDIF.
              idx = idx + 1 .
              READ TABLE item INDEX idx .
              PERFORM bdc_field       USING 'RF05A-NEWBS'
                                            item-newbs.
              PERFORM bdc_field       USING 'RF05A-NEWKO'
                                            item-newko.
              PERFORM bdc_field       USING 'RF05A-NEWUM'
                                            item-newum.
              PERFORM bdc_field       USING 'RF05A-NEWBW'
                                            item-newbw.
              CONTINUE.
            ENDIF.
          ENDIF.
          IF item-newbs = '29' OR item-newbs = '39'.
            IF item-newum = '7'.
              PERFORM bdc_dynpro      USING 'SAPMF05A' '0303'.
              PERFORM bdc_field       USING 'BDC_CURSOR'
                                            'BSEG-ZFBDT'.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                            '=ZK'.
              PERFORM bdc_field       USING 'BSEG-WRBTR'
                                            item-wrbtr.
              PERFORM bdc_field       USING 'BSEG-GSBER'
                                            item-gsber.
              PERFORM bdc_field       USING 'BSEG-ZFBDT'
                                            item-zfbdt1.
              PERFORM bdc_field       USING 'BSEG-ZUONR'
                                            item-zuonr.
              PERFORM bdc_field       USING 'BSEG-SGTXT'
                                            item-sgtxt.
              PERFORM bdc_dynpro      USING 'SAPMF05A' '0332'.
              PERFORM bdc_field       USING 'BDC_CURSOR'
                                            'RF05A-NEWKO'.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                            '/00'.
              PERFORM bdc_field       USING 'BSEG-BEWAR'
                                            item-ttype.
              IF idx1 = '002' .
                EXIT.
              ENDIF.
              idx = idx + 1 .
              READ TABLE item INDEX idx .
              PERFORM bdc_field       USING 'RF05A-NEWBS'
                                            item-newbs.
              PERFORM bdc_field       USING 'RF05A-NEWKO'
                                            item-newko.
              PERFORM bdc_field       USING 'RF05A-NEWUM'
                                            item-newum.
              PERFORM bdc_field       USING 'RF05A-NEWBW'
                                            item-newbw.
              CONTINUE.
            ENDIF.
          ENDIF.
          IF item-newbs = '01' OR item-newbs = '11'
             OR item-newbs = '05' OR item-newbs = '15'.
            PERFORM bdc_dynpro      USING 'SAPMF05A' '0301'.
            PERFORM bdc_field       USING 'BDC_CURSOR'
                                          'RF05A-NEWKO'.
            PERFORM bdc_field       USING 'BDC_OKCODE'
                                           '/00'.
            PERFORM bdc_field       USING 'BSEG-WRBTR'
                                          item-wrbtr.
            PERFORM bdc_field       USING 'BSEG-GSBER'
                                           item-gsber.
            PERFORM bdc_field       USING 'BSEG-ZTERM'
                                           item-zterm.
            PERFORM bdc_field       USING 'BSEG-ZFBDT'
                                          item-zfbdt.
            PERFORM bdc_field       USING 'BSEG-ZUONR'
                                          item-zuonr.
            PERFORM bdc_field       USING 'BSEG-SGTXT'
                                          item-sgtxt.
            IF idx1 = '002' .
              EXIT.
            ENDIF.
            idx = idx + 1 .
            READ TABLE item INDEX idx .
            PERFORM bdc_field       USING 'RF05A-NEWBS'
                                          item-newbs.
            PERFORM bdc_field       USING 'RF05A-NEWKO'
                                          item-newko.
            PERFORM bdc_field       USING 'RF05A-NEWUM'
                                          item-newum.
            PERFORM bdc_field       USING 'RF05A-NEWBW'
                                          item-newbw.
            CONTINUE.
          ENDIF.
          IF item-newbs = '21' OR item-newbs = '31'
             OR item-newbs = '25' OR item-newbs = '35'.
            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'
                                          item-wrbtr.
            PERFORM bdc_field       USING 'BSEG-SECCO'
                                          ''.   "'1000'.
            PERFORM bdc_field       USING 'BSEG-GSBER'
                                          item-gsber.
            PERFORM bdc_field       USING 'BSEG-ZTERM'
                                           item-zterm.
            PERFORM bdc_field       USING 'BSEG-ZFBDT'
                                          item-zfbdt.
            PERFORM bdc_field       USING 'BSEG-ZUONR'
                                          item-zuonr.
            PERFORM bdc_field       USING 'BSEG-SGTXT'
                                          item-sgtxt.
            IF idx1 = '002' .
              EXIT.
            ENDIF.
            idx = idx + 1.
            READ TABLE item INDEX idx.
            PERFORM bdc_field       USING 'RF05A-NEWBS'
                                          item-newbs.
            PERFORM bdc_field       USING 'RF05A-NEWKO'
                                          item-newko.
            PERFORM bdc_field       USING 'RF05A-NEWUM'
                                          item-newum.
            PERFORM bdc_field       USING 'RF05A-NEWBW'
                                          item-newbw.
            CONTINUE.
          ENDIF.
          IF item-newbs = '70' OR item-newbs = '75'.
            PERFORM bdc_dynpro      USING 'SAPMF05A' '0305'.
            PERFORM bdc_field       USING 'BDC_CURSOR'
                                          'BSEG-WRBTR'.
            PERFORM bdc_field       USING 'BDC_OKCODE'
                                          '/00'.
            PERFORM bdc_field       USING 'BSEG-WRBTR'
                                          item-wrbtr.
            PERFORM bdc_field       USING 'DKACB-FMORE'
                                                'X'.
            PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
            PERFORM bdc_field       USING 'BDC_CURSOR'
                                          'COBL-PRCTR'.
            PERFORM bdc_field       USING 'BDC_OKCODE'
                                          '=ENTE'.
            PERFORM bdc_field       USING 'COBL-GSBER'
                                          item-gsber.
            PERFORM bdc_field       USING 'COBL-KOSTL'
                                          item-kostl.
            PERFORM bdc_field       USING 'COBL-PRCTR'
                                          item-prctr.
            PERFORM bdc_dynpro      USING 'SAPMF05A' '0305'.
            PERFORM bdc_field       USING 'BDC_CURSOR'
                                          'RF05A-NEWBW'.
            PERFORM bdc_field       USING 'BDC_OKCODE'
                                          '/00'.
            PERFORM bdc_field       USING 'BSEG-WRBTR'
                                          item-wrbtr.
    PERFORM bdc_field       USING 'BSEG-BZDAT'
                                   '01.04.2005'.
            IF idx1 = '002' .
              EXIT.
            ENDIF.
            idx = idx + 1 .
            READ TABLE item INDEX idx .
            PERFORM bdc_field       USING 'RF05A-NEWBS'
                                          item-newbs.
            PERFORM bdc_field       USING 'RF05A-NEWKO'
                                          item-newko.
            PERFORM bdc_field       USING 'RF05A-NEWUM'
                                           item-newum.
            PERFORM bdc_field       USING 'RF05A-NEWBW'
                                          item-newbw.
            CONTINUE.
          ENDIF.
        ENDLOOP.
        PERFORM bdc_field   USING  'BDC_OKCODE'     
                                    '=BU'.
        PERFORM bdc_transaction USING 'F-02'.
        DELETE item INDEX 1.
        DELETE item INDEX 1.
        ix = ix + 2 .
      ENDDO.
      PERFORM close_group.

  • Displaying the message in output of BDC program.

    Hi,
    I have developed the BDC program for running the MMPV and MMRV transaction code in that in output want to display the message that for which company code posting is done or some error is occurring. Below shown message is populate in when standard transaction code MP is execute.
    AL O G
    Mode: Check and close period
    Client: 140
    Period entered (month/year): 11 2007
    Incorrect period in control recd. of CoCd 1306; no conversion The current period (month/year) of the control record is 11 2007
    Period closing complete; log issued.
    E N D
    I want like this message to be display in output of the program, currently I am using the function module FORMAT_MESSAGE. It is displaying the message which is appearing on status bar only. I am not able to capture the message which is shown above.
    In this problem can any body can guide me

    I am using the Call transaction method.I use the internal table of 'bdcmsgcoll' in the program but  I am not able to get the message in internal table  other than the message which is appearing on the on the status bar, the message  which I  shown in mail it's an log message which is coming after running the standard MMPV transaction code.
    below shown is the code which I written.
    DATA:   BDCDATA LIKE BDCDATA    OCCURS 0 WITH HEADER LINE.
          messages of call transaction
    DATA:   MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
             chetan
           W_MESSTAB LIKE BDCMSGCOLL .
          error session opened (' ' or 'X')
    DATA:   E_GROUP_OPENED.
          message texts
    DATA:   session LIKE apqi-groupid VALUE 'X',  " VALUE 'GAN'.
            GROUP TYPE APQI-GROUPID,
            USER TYPE APQI-USERID value 'SY-UNAME',
            KEEP TYPE APQI-QERASE,
            HOLDDATE TYPE APQI-STARTDATE,
            SMALLLOG(1) TYPE C VALUE ' ',
            CTUMODE LIKE CTU_PARAMS-DISMODE VALUE 'N',
            CUPDATE LIKE CTU_PARAMS-UPDMODE VALUE 'L', "'L'
            E_GROUP(12) TYPE C,
            E_USER TYPE SY-UNAME,
            E_KEEP(12) TYPE C,
            E_HDATE TYPE SY-DATUM.
    FORM BDC_TRANSACTION USING TCODE.
      DATA: L_MSTRING(480).
      DATA: L_SUBRC LIKE SY-SUBRC.
      DATA: L_Message(255) TYPE C .
      REFRESH MESSTAB.
      CALL TRANSACTION TCODE USING BDCDATA
                       MODE   CTUMODE
                       UPDATE CUPDATE
                       MESSAGES INTO MESSTAB.
      L_SUBRC = SY-SUBRC.
      IF SMALLLOG <> 'X'.
        LOOP AT MESSTAB.
          CALL FUNCTION 'FORMAT_MESSAGE'
            EXPORTING
              ID        = MESSTAB-MSGID
              LANG      = sy-langu
              NO        = MESSTAB-MSGNR
              V1        = MESSTAB-MSGV1
              V2        = MESSTAB-MSGV2
              V3        = MESSTAB-MSGV3
              V4        = MESSTAB-MSGV4
            IMPORTING
              MSG       = L_MESSAGE
            EXCEPTIONS
              NOT_FOUND = 1
              OTHERS    = 2.
          IF SY-SUBRC <> 0.
            MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.  "'-D'
          ENDIF.
          wa_tab-v_message = l_message.
        ENDLOOP.
      ENDIF.
      REFRESH BDCDATA.
    ENDFORM.                    "BDC_TRANSACTION
    FORM   mmpv_tcode .
      SELECT bukrs lfgja lfmon
      INTO table t_tab
      FROM marv
      WHERE bukrs IN s_bukrs AND
            lfgja IN s_lfgja AND
            lfmon IN s_lfmon.
      IF SY-SUBRC <> 0.
        MESSAGE 'NO TABLE  ENTRY FOUND FOR MMPV' TYPE 'I'.
        Leave list-processing.
        v_check = '1'.
      ENDIF.
    MMPV Program execution of all the company codes using loop.
      LOOP AT t_tab INTO wa_tab.
        perform bdc_dynpro      using 'RMMMPERI' '1000'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'I_LFGJA'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=ONLI'.
        perform bdc_field       using 'I_VBUKR'
                                      wa_tab-bukrs.
        perform bdc_field       using 'I_LFMON'
                                      wa_tab-lfmon.
        perform bdc_field       using 'I_LFGJA'
                                      wa_tab-lfgja.
        IF R_XCOMP = 'X'.
          perform bdc_field       using 'I_XCOMP'
                                        'X'.
        ENDIF.
        IF R_XINCO ='X'.
          perform bdc_field       using 'I_XINCO'
                                      'X'.
        ENDIF.
        IF R_XMOVE = 'X'.
          perform bdc_field       using 'I_XMOVE'
                                        'X'.
        ENDIF.
        IF R_XNEGQ = 'X'.
          perform bdc_field       using 'I_XNEGQ'
                                      'X'.
        ENDIF.
        IF R_XNEGV = 'X'.
          perform bdc_field       using 'I_XNEGV'
                                      'X'.
        ENDIF.
        perform bdc_dynpro      using 'SAPMSSY0' '0120'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=BABA'.
        perform bdc_dynpro      using 'RMMMPERI' '1000'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '/EE'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'I_VBUKR'.
        perform bdc_transaction using 'MMPV'.
        wa_tab2-v_code = wa_tab-bukrs.
        wa_tab2-v_fyear = wa_tab-lfgja.
        wa_tab2-v_period = wa_tab-lfmon + 1.
        wa_tab2-v_message1 = wa_tab-v_message.
        APPEND wa_tab2 to t_tab2.
        clear wa_tab2.
      ENDLOOP.
    ENDFORM.                    " mmpv_tcode
    I want that log message is to be displayed in the output.
    Currently I am getting the output like this.
    Report for posting MM period
             Company Code        Financial year                Period open for posting       Message
    I want the message should e display under 'message' coloum.
             1306                2007                          12

  • Changes in BDC program to upload data from text/excel file

    Hi friends i have obtained the BDc program after recording :
    start-of-selection.
    perform open_group.
    perform bdc_dynpro      using 'SAPLCOIH' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'CAUFVD-GSBER'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'AUFPAR-PM_AUFART'
                                  'PM01'.
    perform bdc_field       using 'CAUFVD-IWERK'
                                  '460a'.
    perform bdc_field       using 'CAUFVD-GSBER'
                                  '2460'.
    perform bdc_field       using 'CAUFVD-EQUNR'
                                  '10000009'.
    perform bdc_dynpro      using 'SAPLCOIH' '3000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'CAUFVD-KTEXT'
                                  'abc'.
    perform bdc_field       using 'CAUFVD-INGPR'
                                  'GM'.
    perform bdc_field       using 'CAUFVD-VAPLZ'
                                  'RTN_VELR'.
    perform bdc_field       using 'CAUFVD-VAWRK'
                                  '460A'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'CAUFVD-GLTRP'.
    perform bdc_field       using 'CAUFVD-GSTRP'
                                  '1.8.2010'.
    perform bdc_field       using 'CAUFVD-GLTRP'
                                  '1.8.2010'.
    perform bdc_field       using 'CAUFVD-TPLNR'
                                  'RTNP-HIG'.
    perform bdc_field       using 'CAUFVD-EQUNR'
                                  '10000009'.
    perform bdc_field       using 'AFVGD-INDET'
                                  '1'.
    perform bdc_field       using 'AFVGD-WERKS'
                                  '460A'.
    perform bdc_field       using 'AFVGD-STEUS'
                                  'PMIN'.
    perform bdc_field       using 'AFVGD-ARBEH'
                                  'H'.
    perform bdc_field       using 'AFVGD-DAUNE'
                                  'H'.
    perform bdc_dynpro      using 'SAPLCOIH' '3000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BU'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'CAUFVD-KTEXT'.
    perform bdc_field       using 'CAUFVD-KTEXT'
                                  'abc'.
    perform bdc_field       using 'CAUFVD-INGPR'
                                  'GM'.
    perform bdc_field       using 'CAUFVD-VAPLZ'
                                  'RTN_VELR'.
    perform bdc_field       using 'CAUFVD-VAWRK'
                                  '460A'.
    perform bdc_field       using 'CAUFVD-GSTRP'
                                  '01.08.2010'.
    perform bdc_field       using 'CAUFVD-GLTRP'
                                  '01.08.2010'.
    perform bdc_field       using 'CAUFVD-TPLNR'
                                  'RTNP-HIG'.
    perform bdc_field       using 'CAUFVD-EQUNR'
                                  '10000009'.
    perform bdc_field       using 'AFVGD-LTXA1'
                                  'abc'.
    perform bdc_field       using 'AFVGD-INDET'
                                  '1'.
    perform bdc_field       using 'AFVGD-ARBPL'
                                  'RTN_VELR'.
    perform bdc_field       using 'AFVGD-WERKS'
                                  '460A'.
    perform bdc_field       using 'AFVGD-STEUS'
                                  'PMIN'.
    perform bdc_field       using 'AFVGD-ARBEH'
                                  'H'.
    perform bdc_field       using 'AFVGD-DAUNE'
                                  'H'.
    perform bdc_transaction using 'IW31'.
    perform close_group.
    after executing it has two options.one is for call transactioin and other is for with session.Now i want to do the uploading from text file.Please guide me how to achieve that and what should be the order of fields in the text file.I am just a beginner.I know how to do that with LSMW bt trying BDc first time for creating PM orders

    You can use class "cl_gui_frontend_services". First you must select file with "file_open_dialog" method and the you can upload file with "gui_upload" method into internal table. Here is a sample: (I didn't try the code but I'm sure you can get it working, there are lots of sample codes about that. You can also search FM "GUI_UPLOAD").
    REPORT  zreport.
    DATA:
    gv_subrc TYPE sysubrc,
    gv_result TYPE abap_bool,
    gt_data_tab type table of zstruc.
    PARAMETERS: p_fname LIKE rlgrap-filename.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
        PERFORM file_open_dialog USING space space space space
                            CHANGING p_fname gv_action gv_subrc.
    START-OF-SELECTION.
    PERFORM gui_upload TABLES gt_data_tab
                     USING p_fname  CHANGING gv_subrc.
    *** FORMS ***
    FORM file_open_dialog USING pv_window_title
                                pv_default_extension
                                pv_default_filename
                                pv_initial_directory
                       CHANGING pv_filename
                                pv_user_action
                                pv_subrc.
      DATA:
      lt_file_table TYPE filetable,
      lv_rc         TYPE i,
      lv_initial_directory TYPE string.
      IF pv_initial_directory IS INITIAL.
        PERFORM get_desktop_directory CHANGING lv_initial_directory.
      ELSE.
        lv_initial_directory = pv_initial_directory.
      ENDIF.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          window_title            = pv_window_title
          default_extension       = pv_default_extension
          default_filename        = pv_default_filename
    *     file_filter             =
    *     with_encoding           =
          initial_directory       = lv_initial_directory
    *     multiselection          =
        CHANGING
          file_table              = lt_file_table
          rc                      = lv_rc
          user_action             = pv_user_action
    *     file_encoding           =
        EXCEPTIONS
          file_open_dialog_failed = 1
          cntl_error              = 2
          error_no_gui            = 3
          not_supported_by_gui    = 4
          OTHERS                  = 5
      pv_subrc = sy-subrc.
      IF pv_subrc EQ 0.
        READ TABLE lt_file_table INTO pv_filename INDEX 1.
      ENDIF.
    ENDFORM.
    FORM gui_upload TABLES pt_data_tab
                     USING pv_filename
                  CHANGING pv_subrc    TYPE sysubrc.
      DATA:
      lt_data_tab TYPE TABLE OF string,
      lv_filename TYPE string.
      lv_filename = pv_filename.
      CALL METHOD cl_gui_frontend_services=>gui_upload
        EXPORTING
          filename                = lv_filename
          filetype                = 'ASC'
         has_field_separator     = 'X'
    *     header_length           = 0
    *     read_by_line            = 'X'
    *     dat_mode                = SPACE
    *     codepage                = SPACE
    *     ignore_cerr             = ABAP_TRUE
    *     replacement             = '#'
    *     virus_scan_profile      =
    *     show_transfer_status    = 'X'
    *   IMPORTING
    *     filelength              =
    *     header                  =
        CHANGING
          data_tab                = lt_data_tab
        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
          not_supported_by_gui    = 17
          error_no_gui            = 18
          OTHERS                  = 19
      pv_subrc = sy-subrc.
      IF pv_subrc EQ 0.
        pt_data_tab[] = lt_data_tab[].
      ENDIF.
    ENDFORM.

Maybe you are looking for

  • How do I back up my itunes and music library to an ext hard drive?

    i need to do a system recovery and don't know what to do?

  • JAVA or LINUX bug?

    My Java program crashes (on a Linux system) with the following log: # An unexpected error has been detected by HotSpot Virtual Machine: # SIGSEGV (0xb) at pc=0x4c949182, pid=2672, tid=2981530512 # Java VM: Java HotSpot(TM) Client VM (1.5.0_12-b04 mix

  • Source video in iMovie

    Got some questions concerning iMovie 8: 1. When I try to trash "rejected clips", a dialogue box says I can't, and that I don't have enough disk space! I did empty the trash, as the instructions said. I am using an external hard drive to hold the sour

  • Dynex blu-ray player & 5GHz

    I just got a new router with a dediated 5GHz signal and a separate 2.5GHz signal. My Dynex blu-ray player (the nice little $79 unit - don't have the model) connects to the 2.5 no problem but doesn't seem to recognize the 5. Is there a way to get the

  • Dynamic browser language setting

    Hi, I need some information on internationalization. Let me explain the issue.. In my application I need both English and Arabic views. It is possible to Change the language through internationalization. But one more issue is there for Arabic languag