SAPMF02K

Dear All
We are trying to make the IBAN field required if bank country is SA. For this we are tryign to activate user exit SAPMF02K. But we check in this user exit field IBAN is not available in any of the table. if some one has use this user exit for  this purpose please let us know how to make IBAN required> If someone make the IBAN required through some other way please also share with us
Thanks and Best Regards
Farhan Qaiser

HI
Generally the bank details in vendor master data is being controlled by the payment method you use to make payment. If you goto FBZP in payment method at country level if you see in the required master specifications please check swift code and IBAN or bank details based on your requirement. Please do come back if you need further information.
Thanks!!
Regards,
Vivek

Similar Messages

  • Fill all required fields SAPMF02K 0111 SZA1_D0100-TITLE_MEDI

    Hi all
    Scenario MDM - Xi - R3
    We're sending the idoc from mdm to xi, but we get an error in the R3 side about: Fill all required fields SAPMF02K 0111 SZA1_D0100-TITLE_MEDI.
    I read some notes and i have tried to change some things about MSGFN value 009, 005 but it doesn't work... Can anybody help me??
    The XML looks like:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <CREMDM04>
    - <IDOC BEGIN="1">
    - <E1LFA1M SEGMENT="1">
      <MSGFN>005</MSGFN>
      <LIFNR>0005001282</LIFNR>
      <ANRED>/</ANRED>
      <BRSCH>SEJ</BRSCH>
      <DATLT>/</DATLT>
      <DTAWS>/</DTAWS>
      <ERDAT>/</ERDAT>
      <ERNAM>/</ERNAM>
      <KTOKK>VADN</KTOKK>
      <KUNNR>/</KUNNR>
      <LAND1>/</LAND1>
      <LNRZA>/</LNRZA>
      <NAME1>/</NAME1>
      <NAME2>/</NAME2>
      <NAME3>/</NAME3>
      <NAME4>/</NAME4>
      <ORT01>/</ORT01>
      <ORT02>/</ORT02>
      <PFACH>/</PFACH>
      <PSTL2>/</PSTL2>
      <PSTLZ>/</PSTLZ>
      <REGIO>/</REGIO>
      <SORTL>/</SORTL>
      <SPRAS>/</SPRAS>
      <STCD1>BBQ030122SEA</STCD1>
      <STKZU>X</STKZU>
      <STRAS>/</STRAS>
      <TELBX>/</TELBX>
      <TELF1>/</TELF1>
      <TELF2>/</TELF2>
      <TELFX>/</TELFX>
      <TELTX>/</TELTX>
      <TELX1>/</TELX1>
      <XCPDK>/</XCPDK>
      <VBUND>/</VBUND>
      <FISKN>/</FISKN>
      <ADRNR>/</ADRNR>
      <MCOD1>/</MCOD1>
      <MCOD2>/</MCOD2>
      <MCOD3>/</MCOD3>
      <REVDB>/</REVDB>
      <KTOCK>/</KTOCK>
      <PFORT>/</PFORT>
      <WERKS>/</WERKS>
      <LTSNA>/</LTSNA>
      <WERKR>/</WERKR>
      <PLKAL>/</PLKAL>
      <DUEFL>/</DUEFL>
      <TXJCD>/</TXJCD>
      <FITYP>03</FITYP>
      <STCDT>04</STCDT>
      <ACTSS>PG</ACTSS>
    - <E1LFA1A SEGMENT="">
      <J_1KFTIND>Personas Morales</J_1KFTIND>
      </E1LFA1A>
    - <E1ADRMAS SEGMENT="1">
      <OBJ_TYPE>LFA1</OBJ_TYPE>
      <OBJ_ID>0005001282</OBJ_ID>
      <CONTEXT>0001</CONTEXT>
    - <E1BPAD1VL SEGMENT="1">
      <ADDR_VERS>/</ADDR_VERS>
      <FROM_DATE>/</FROM_DATE>
      <TO_DATE>/</TO_DATE>
      <TITLE>0003</TITLE>
      <NAME>BLACK BELT QUALITY CORPORATION SA D</NAME>
      <NAME_2>E CV</NAME_2>
      <CONV_NAME>/</CONV_NAME>
      <C_O_NAME>/</C_O_NAME>
      <CITY>D.F.</CITY>
      <DISTRICT>/</DISTRICT>
      <CITY_NO>/</CITY_NO>
      <DISTRCT_NO>/</DISTRCT_NO>
      <CHCKSTATUS>/</CHCKSTATUS>
      <REGIOGROUP>/</REGIOGROUP>
      <POSTL_COD1>07369</POSTL_COD1>
      <POSTL_COD2>/</POSTL_COD2>
      <POSTL_COD3>/</POSTL_COD3>
      <PCODE1_EXT>/</PCODE1_EXT>
      <PCODE2_EXT>/</PCODE2_EXT>
      <PCODE3_EXT>/</PCODE3_EXT>
      <PO_BOX>/</PO_BOX>
      <PO_W_O_NO>/</PO_W_O_NO>
      <PO_BOX_CIT>/</PO_BOX_CIT>
      <PBOXCIT_NO>/</PBOXCIT_NO>
      <PO_BOX_REG>/</PO_BOX_REG>
      <POBOX_CTRY>/</POBOX_CTRY>
      <PO_CTRYISO>/</PO_CTRYISO>
      <DELIV_DIS>/</DELIV_DIS>
      <TRANSPZONE>/</TRANSPZONE>
      <STREET>AVE. RESIDENCIAL GUSTAVO A. MADERO</STREET>
      <STREET_NO>/</STREET_NO>
      <STR_ABBR>/</STR_ABBR>
      <HOUSE_NO3>/</HOUSE_NO3>
      <STR_SUPPL1>/</STR_SUPPL1>
      <STR_SUPPL2>/</STR_SUPPL2>
      <STR_SUPPL3>/</STR_SUPPL3>
      <LOCATION>/</LOCATION>
      <BUILDING>/</BUILDING>
      <FLOOR>/</FLOOR>
      <ROOM_NO>/</ROOM_NO>
      <COUNTRY>MX</COUNTRY>
      <COUNTRYISO>/</COUNTRYISO>
      <LANGU>S</LANGU>
      <LANGU_ISO>/</LANGU_ISO>
      <REGION>DF</REGION>
      <SORT1>-</SORT1>
      <SORT2>HONORARIOS</SORT2>
      <EXTENS_1>/</EXTENS_1>
      <EXTENS_2>/</EXTENS_2>
      <TIME_ZONE>/</TIME_ZONE>
      <TAXJURCODE>/</TAXJURCODE>
    - <E1BPAD1VL1 SEGMENT="1">
      <ADDRESS_ID>/</ADDRESS_ID>
      <LANGU_CR>/</LANGU_CR>
      <LANGUCRISO>/</LANGUCRISO>
      <ADDR_GROUP>/</ADDR_GROUP>
      <HOME_CITY>/</HOME_CITY>
      <HOMECITYNO>/</HOMECITYNO>
      <DONT_USE_S>/</DONT_USE_S>
      <DONT_USE_P>/</DONT_USE_P>
      </E1BPAD1VL1>
      </E1BPAD1VL>
    - <E1BPADTEL SEGMENT="1">
      <COUNTRY>MX</COUNTRY>
      <TELEPHONE>(55)57597532</TELEPHONE>
      <CALLER_NO>/</CALLER_NO>
      <STD_RECIP>/</STD_RECIP>
      <HOME_FLAG>/</HOME_FLAG>
      <ERRORFLAG>/</ERRORFLAG>
      <FLG_NOUSE>/</FLG_NOUSE>
      </E1BPADTEL>
      <E1BPAD_REM SEGMENT="" />
      </E1ADRMAS>
    - <E1LFB1M SEGMENT="">
      <MSGFN>005</MSGFN>
      <LIFNR>0005001282</LIFNR>
      <BUKRS>102</BUKRS>
      <AKONT>0021051001</AKONT>
      <ZTERM>Z000</ZTERM>
      <FDGRV>A1</FDGRV>
      <REPRF>X</REPRF>
      <HBKID>BNMX</HBKID>
      <ALTKN>62058</ALTKN>
    - <E1LFBWM SEGMENT="">
      <MSGFN>005</MSGFN>
      <LIFNR>0005001282</LIFNR>
      <BUKRS>102</BUKRS>
      <WITHT>RP</WITHT>
      <WT_SUBJCT>X</WT_SUBJCT>
      <WT_WITHCD>HO</WT_WITHCD>
      </E1LFBWM>
    - <E1LFBWM SEGMENT="">
      <MSGFN>005</MSGFN>
      <LIFNR>0005001282</LIFNR>
      <BUKRS>102</BUKRS>
      <WITHT>IV</WITHT>
      <WT_SUBJCT>X</WT_SUBJCT>
      <WT_WITHCD>HI</WT_WITHCD>
      </E1LFBWM>
      </E1LFB1M>
    - <E1LFM1M SEGMENT="">
      <MSGFN>005</MSGFN>
      <LIFNR>0005001282</LIFNR>
      <EKORG>ABMX</EKORG>
      <WAERS>MXN</WAERS>
      <MINBW>0</MINBW>
      <ZTERM>Z000</ZTERM>
      <WEBRE>X</WEBRE>
      <KZABS>X</KZABS>
      <XERSY>X</XERSY>
    - <E1WYT3M SEGMENT="">
      <MSGFN>005</MSGFN>
      <LIFNR>0005001282</LIFNR>
      <EKORG>ABMX</EKORG>
      <PARVW>PR</PARVW>
      </E1WYT3M>
      </E1LFM1M>
    - <E1LFBKM SEGMENT="1">
      <MSGFN>005</MSGFN>
      <LIFNR>0005001282</LIFNR>
      <BANKS>MX</BANKS>
      <BANKL>002</BANKL>
      <BANKN>002180027876216466</BANKN>
      <PROVZ>/</PROVZ>
      <STRAS>/</STRAS>
      <ORT01>/</ORT01>
      <XPGRO>/</XPGRO>
      <PSKTO>/</PSKTO>
      <BKREF>0000002787621646</BKREF>
      <PROV2>/</PROV2>
      <KOINH>BLACK BELT QUALITY CORPORATION SA DE CV</KOINH>
      <KOVON>/</KOVON>
      <KOBIS>/</KOBIS>
      </E1LFBKM>
    - <E1LFASM SEGMENT="1">
      <MSGFN>005</MSGFN>
      <LIFNR>0005001282</LIFNR>
      </E1LFASM>
      </E1LFA1M>
      </IDOC>
      </CREMDM04>

    Hi Jose,
    is there any mapping in between?
    I had the same error message when I mapped to IDoc and didn't fill some header fields/ attributes...
    //Karsten

  • SAPMF02K components in ECC 6.0

    Hi All,
    I'm new in this forum ...
    My problem is the following: Im working in an Upgrade Project and we have to make some test with CREMAS IDOCS. The basic type CREMAS03 has an extension with some Z segments.
    When we change the field "Alternat.payee" by XK02, an idoc must be created. Then by BD14, this idoc have to be sent to another system.
    My problem is when I run the BD14, the idoc created hasn't have the Z segments filled.
    I was looking for the exit where has the code that fill those Z segments.
    And the components:
    EXIT_SAPLKD01_001
    EXIT_SAPLKD02_001
    Are not included in the Enhancement SAPMF02K in ECC 6.0 but they appears in 4.6c ...
    Anybody knows if this could be the problem or there are something else ...?
    Thanks!!!!
    Leandro

    Hi,
    Try this it worked for me though,
    1. Goto SPRO_ADMIN
    2. Select the Project
    3. Choose Change
    4. Go To Transport Requests TAB
    5. Activate CTS Functionality
    6. Save it after the Pop Up
    7. Go to Se10 and check if the Project Field is getting Populated with the Desired Project or not.
    Regards,
    Nitin

  • No batch input data for screen SAPMF02K 0310 in PROD but ok in DEV & QAS

    Hi gurus,
    I created an LSMW recording for vendors but now I am having erros when uploading to PROD. The error No batch input data for screen SAPMF02K 0310 appears. The strange thing is that it works perfectly in DEV and QAS.
    What would cause this? Would there be a problem with the config?
    Edited by: obie villamosa on Sep 9, 2010 7:35 PM

    Howdy,
    As an example, your recording may work perfectly for a vendor that has not been extended to any purchasing orgs - and so it tests fine in Dev and QAS.
    But when you move to Production your recording may fail against a vendor that has been extended to a purchasing org.
    Just one example.  I notice 0310 is the screen for Vendor purchasing org data, so maybe this is what's happening here.
    Cheers
    Alex

  • No batch input data for screen SAPMF02K 0101 for transaction XK02

    Hello Friends,
    I am Trying to change detaisl of Vendor using IDOC for T code XK02, I am getting an error in background
    No batch input data for screen SAPMF02K 0101
    Message no. 00344
    When I execute in foreground it is working fine.
    Diagnosis
    The transaction sent a screen that was not expected in the batch input session and which therefore could not be supplied with data.
    Possible reasons:
    1. The batch input session was created incorrectly. The sequence of screens was recordly incorrectly.
    2. The transaction behaves differently in background processing in a batch work process than when running in dialog (SY-BATCH is queried and changes the screen sequence).
    3. The transaction has undergone user-specific Customizing and therefore certain screens may be skipped or processed differently, according to the current user. If the person who created a batch input session is not the same as the person now processing it, this problem may occur frequently.

    just info: as u seen in the 3rd point, if u r running onlien, its recorded on ur user id, but, where as for back ground, the user lke WF_BATCH.........so, for this user, the settings may b different from a dialog user, in terms of  screen sequence, pop-ups. mandatory fields.
    So, i guess, u r missing to populate a input field, which is mandatory. May be by suing sy-batch IF condition, u hv to change CTU_PARAMS values, like sy-batin = 'X'......actually, these day si dont hv SAP access, so, pls. check some terms in this response.
    thanq

  • Cadastro de Empresa como Fornecedor e Centro

    Prezados,
    Estou com um problema com relação à criação de Fornecedor para Empresa e atrelamento de Centro:
    Cenário: Tenho 1 Empresa onde a mesma tem um Grupo de Contas para Fornecedor e outra pra Centro.
    Empresa: 1000
    Grupo de Contas Transferência : TREC
    Grupo de Contas Fornecedor    : INT1
    O motivo dos dois Grupos de Contas é que em um momento eu utilizo para transferência e outro momento como fornecedor.
    A transferência foi criado como Grupo de Contas TREC, pois utilizo este cadastro para amarrar o Código do Centro no Cadastro do Fornecedor em "Dados Adicionais de Compras".
    O problema é que eu não consigo criar um pedido de mercadoria de Fornecedor com este Grupo de Contas, pois o sistema entende que quando o Centro está atrelado ao cadastro do Fornecedor eu posso apenas utilizar para Transferência (Isto no meu entendimento).
    Enfim, se eu retirar o Centro do Cadastro do Fornecedor eu consigo utilizar normalmente o Grupo de Contas TREC, porém quando vou efetuar a Transferência gera erro na entrada da mercadoria no momento de reconhecer os impostos para Emissor x Receptor, pois o sistema busca a Região se no cadastro do fornecedor existir o atrelamento do Centro ao fornecedor.
    O objetivo inicial dos dois Grupos de contas era cadastrar um como Transferência e outro como empresa Fornecedora, porém não conseguimos criar 2 Grupos de Contas para CNPJs Iguais.
    Alguém poderia me ajudar? ou me  explicar como efetua-se um cadastro desta forma?

    Prezados,
    Para corrigir o problema efetuei um tratamento na EXIT abaixo:
    ZXF05U01
    SAPMF02K - EXIT_SAPMF02K_001.
    OBS: Para passar nesta EXIT você tem que desativar as validações Standards de CNPJ e CPF, porém isto também afeta a equipe de SD.
    A visão abaixo foi alterada: V_TFKTAXNUMTYPEC
    Alterar os Grupos BR, retirar a validação (OFF).
    E por este motivo deve ser tratado também na EXIT de SD, segue abaixo:
    ZXF04U01
    SAPMF02D - EXIT_SAPMF02D_001
    Com isto efetuamos todas as validações da Empresa através destas EXITS da forma e Padrão da empresa, você também pode optar por uma FIELD-EXIT caso não queira desativar as regras Standards.
    Abraços,

  • Internal table in bdc

    I am new to the bdc .
    i have gone to SHDB and created a new recording  for the some T-code .
    After that i have created a prog (transfer from recording ) .
    i got some values in the file in my presenation server.
    i got default code generated .
    I have to declare the internal table of some time .
    may i know of which type should i declare my internal table ??
    My code ****************************************************************
    report ZRAJESH_BDC
           no standard page heading line-size 255.
    include bdcrecx1.
    start-of-selection.
    perform open_group.
    *******loop
    perform bdc_dynpro      using 'SAPMF02K' '0101'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF02K-D0110'.
    perform bdc_field       using 'RF02K-LIFNR'
                                  '12345'.
    perform bdc_field       using 'RF02K-D0110'
                                  'X'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0110'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-TELF2'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=UPDA'.
    perform bdc_field       using 'LFA1-ANRED'
                                  'Mr.'.
    perform bdc_field       using 'LFA1-NAME1'
                                  'RAJESH'.
    perform bdc_field       using 'LFA1-SORTL'
                                  'Q'.
    perform bdc_field       using 'LFA1-LAND1'
                                  'US'.
    perform bdc_field       using 'LFA1-SPRAS'
                                  'EN'.
    perform bdc_field       using 'LFA1-TELF2'
                                  '9033558227'.
    perform bdc_transaction using 'XK02'.
    perform close_group.
           Start new screen                                              *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR BDCDATA.
      BDCDATA-PROGRAM  = PROGRAM.
      BDCDATA-DYNPRO   = DYNPRO.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND BDCDATA.
    ENDFORM.
           Insert field                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
      IF FVAL <> NODATA.
        CLEAR BDCDATA.
        BDCDATA-FNAM = FNAM.
        BDCDATA-FVAL = FVAL.
        APPEND BDCDATA.
      ENDIF.
    ENDFORM.

    Hi,
    I have one simple  BDC Program  .
    Just you have to do recording by using SHDB Transaction Code.
    and Copy that program and do some modification by following my Program and upload data to that perticular transaction.
    before that u have to prepare data in Text file by using TAB Space .
    Below is the Code(I have used MM01 transaction)
    ******************************************************************************************8
    report ZBDCTEST no standard page heading line-size 255.
    ***DECLARING TABLES.
    TABLES : MARA.
    **DECLARING INTERNAL TABLE.
    DATA : BEGIN OF ITAB OCCURS 0,
           MATNR LIKE MARA-MATNR,
           MEINS LIKE MARA-MEINS,
           MATKL LIKE MARA-MATKL,
           Maktx like makt-maktx,
           SPART LIKE MARA-SPART,
           END OF ITAB.
    DATA BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
       CODEPAGE                      = 'IBM'
       FILENAME                      = 'C:\TEST.TXT'
       FILETYPE                      = 'DAT'
      HEADLEN                       = ' '
      LINE_EXIT                     = ' '
      TRUNCLEN                      = ' '
      USER_FORM                     = ' '
      USER_PROG                     = ' '
      DAT_D_FORMAT                  = ' '
    IMPORTING
      FILELENGTH                    =
      TABLES
        DATA_TAB                      = ITAB
    EXCEPTIONS
      CONVERSION_ERROR              = 1
      FILE_OPEN_ERROR               = 2
      FILE_READ_ERROR               = 3
      INVALID_TYPE                  = 4
      NO_BATCH                      = 5
      UNKNOWN_ERROR                 = 6
      INVALID_TABLE_WIDTH           = 7
      GUI_REFUSE_FILETRANSFER       = 8
      CUSTOMER_ERROR                = 9
      OTHERS                        = 10
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *include bdcrecx1.
    *start-of-selection.
    *perform open_group.
    LOOP AT ITAB.
      REFRESH BDCDATA.
      perform bdc_dynpro      using 'SAPLMGMM' '0060'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'RMMG1_REF-MATNR'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '=AUSW'.
      perform bdc_field       using 'RMMG1-MATNR'
                                    ITAB-MATNR.
      perform bdc_field       using 'RMMG1-MBRSH'
                                    'M'.
      perform bdc_field       using 'RMMG1-MTART'
                                    'FOOD'.
      perform bdc_dynpro      using 'SAPLMGMM' '0070'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'MSICHTAUSW-DYTXT(02)'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '=ENTR'.
      perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                                    'X'.
      perform bdc_field       using 'MSICHTAUSW-KZSEL(02)'
                                    'X'.
      perform bdc_dynpro      using 'SAPLMGMM' '4000'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '=SP02'.
      perform bdc_field       using 'MAKT-MAKTX'
                                    'T1003'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'MARA-MATKL'.
      perform bdc_field       using 'MARA-MEINS'
                                    'BOX'.
      perform bdc_field       using 'MARA-MATKL'
                                     ITAB-MATKL.
      perform bdc_field       using 'MARA-SPART'
                                    ITAB-SPART.
      perform bdc_field       using 'MARA-MTPOS_MARA'
                                    'NORM'.
      perform bdc_dynpro      using 'SAPLMGMM' '4004'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '=BU'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'MAKT-MAKTX'.
      perform bdc_field       using 'MAKT-MAKTX'
                                    'T1003'.
    *perform bdc_transaction using 'MM01'.
    *perform close_group.
      CALL TRANSACTION 'MM01' USING BDCDATA MODE 'A'. "A= all screens ,N= no screens
    ENDLOOP.
           Start new screen                                              *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR BDCDATA.
      BDCDATA-PROGRAM  = PROGRAM.
      BDCDATA-DYNPRO   = DYNPRO.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND BDCDATA.
    ENDFORM.
           Insert field                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
      IF FVAL <> SPACE.
        CLEAR BDCDATA.
        BDCDATA-FNAM = FNAM.
        BDCDATA-FVAL = FVAL.
        APPEND BDCDATA.
      ENDIF.
    ENDFORM.
    if you want further help let me know
    Regards,
    Jak

  • Implicit enhancement to a standard function module.

    Hi everybody.
    I used an Implicit Enhancement to a Standard function module Customized_Message, at the starting of function module.
    Code:
    ENHANCEMENT 1  ZFK01_ENHANCEMENT4.    "active version
    If sy-tcode = 'FK01' and sy-CPROG = 'SAPMF02K' AND I_MSGNR = '230' AND i_arbgb = 'F2' AND I_DTYPE = 'I'.
      EXIT.
    ENDIF.
    ENDENHANCEMENT.
    The above is working fine, to the condition what i had given above code.
    But my question is, can i use a implicit enchancement to a Standard function module(Customized_message).

    Yes, but you should also be aware that 'F2' is a configurable message class in the IMG.  You should attempt to solve your issue in that manner first.

  • Improve performance of bdc call transaction

    Hi all,
    I am performing a batch update of tax codes in a BDC call transaction program. This particular code takes about 3 minutes to process 2,600 entries. I have tried almost everything but is there a way to improve / make it run faster?
    I have a feeling it has something to do with the form "do_transaction", but I really don't know anymore.
    Thank you in advance.
    Attached is the code:
    *& Report  ZFI_CHANGEWTAX
    *&  Description: Change Doctors Withholding Tax Code (EI)
    *&  Using BDC Call Transaction Method
    *&  Created by : mpena
    *&  Created on : 07/15/2009
    *&  Modification History
    *&  Seq  Changed on
    *&       Changed by
    *&  001   07/15/2009
    *&        mpena         Initial Development
    *&  002   07/20/2009
    *&        mpena         Logic modification
    *&                      Testing
    *&  003   07/20/2009
    *&        mpena         Call function parameter modification
    *&  004   07/22/2009
    *&        mpena         Report generation
    *&                      Performance improvements
    REPORT zfi_changewtax
           NO STANDARD PAGE HEADING
           MESSAGE-ID zfk02msg.
    TYPES: BEGIN OF t_tax,
           lifnr LIKE lfa1-lifnr,                "account number
           wt_withcd LIKE lfbw-wt_withcd,        "current tax code
           wt_withcd_new LIKE lfbw-wt_withcd,    "new tax code (left blank at default)
           END OF t_tax.
    DATA:  wa_tax TYPE t_tax,
           i_tax TYPE STANDARD TABLE OF t_tax,
           it_bdcdata TYPE bdcdata OCCURS 0 WITH HEADER LINE,
           lin TYPE i.
    -------Selection Screen Design -
    SELECTION-SCREEN:
    SKIP 1,
    BEGIN OF BLOCK blk1 WITH FRAME TITLE aaa.
    PARAMETERS: p_ktokk LIKE lfa1-ktokk DEFAULT 'DOCT' OBLIGATORY,
                p_bukrs LIKE lfbw-bukrs DEFAULT 'SL' OBLIGATORY,
                p_wtax LIKE lfbw-wt_withcd OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK blk1.
    INITIALIZATION.
      aaa = 'Change Tax Code to specified value'.
    TOP-OF-PAGE.
      WRITE:
      / 'Update of taxes successful on:', sy-datum, sy-uzeit,
      / 'Generated by:', sy-uname,
      / 'Company Code:', p_bukrs, 'Vendor Group:', p_ktokk.
      SKIP 1.
      ULINE.
      WRITE:
      / 'Account Number', 20 'Old Withholding Tax Code', 50 'New Withholding Tax Code'.
      ULINE.
    START-OF-SELECTION.
      SELECT lfa1~lifnr
             lfbw~wt_withcd
      INTO TABLE i_tax
      FROM lfa1 INNER JOIN lfbw
        ON lfa1lifnr = lfbwlifnr
        WHERE lfbw~bukrs EQ p_bukrs
        AND lfbw~witht EQ 'EI'.
      IF sy-subrc EQ 0.
        DESCRIBE TABLE i_tax LINES lin.
      ENDIF.
    Update i_tax with new value of wt_witchd, then display for comparison.
    After write: if old and new tax are the same, tax update was not successful for that specific account
    or inputted tax type is the same as the old one.
      LOOP AT i_tax INTO wa_tax.
        wa_tax-wt_withcd_new = p_wtax.
        MODIFY i_tax FROM wa_tax.
        WRITE:
        / wa_tax-lifnr,
        20 wa_tax-wt_withcd,
        50 wa_tax-wt_withcd_new.
        CLEAR wa_tax.
      ENDLOOP.
      PERFORM do_transaction USING p_bukrs p_wtax.
    *&      Form  do_transaction
         Extracted from ZFKO2 recording accessible in shdb.
    FORM do_transaction USING v_bukrs v_wtax.
      MESSAGE i000 WITH lin.
      LOOP AT i_tax INTO wa_tax.
        REFRESH it_bdcdata.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0106'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RF02K-D0610'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'RF02K-LIFNR'
                                      wa_tax-lifnr.
        PERFORM bdc_field       USING 'RF02K-BUKRS'
                                      v_bukrs.
        PERFORM bdc_field       USING 'RF02K-D0610'
                                      'X'.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0610'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFBW-WT_WITHCD(01)'.
        PERFORM bdc_field       USING 'LFB1-QLAND'
                                      'PH'.
        PERFORM bdc_field       USING 'LFBW-WT_WITHCD(01)'
                                      v_wtax.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0610'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=UPDA'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFB1-QLAND'.
        PERFORM bdc_field       USING 'LFB1-QLAND'
                                      'PH'.
        CALL TRANSACTION 'FK02' USING it_bdcdata
                                MODE   'N'
                                UPDATE 'A'.
      ENDLOOP.
      MESSAGE i001.
    ENDFORM.                    "do_transaction
           form for bdc dynpro
    FORM bdc_dynpro USING program
                          dynpro.
      it_bdcdata-program = program.
      it_bdcdata-dynpro = dynpro.
      it_bdcdata-dynbegin = 'X'.
      APPEND it_bdcdata.
      CLEAR it_bdcdata.
    ENDFORM.                    "bdc_dynpro
           form for bdc field
    FORM bdc_field  USING fnam
                          fval.
      it_bdcdata-fnam = fnam.
      it_bdcdata-fval = fval.
      APPEND it_bdcdata.
      CLEAR it_bdcdata.
    ENDFORM.                    "bdc_field

    You might want to try using a BAPI instead of a call transaction.   I believe "BAPI_VENDOR_SAVECHARVALREPLICA" will work for you.  Calling a BAPI is just like calling a function module.   After you call the bapi remember to commit it with the function module "BAPI_TRANSACTION_COMMIT".

  • Update Vendor Reconciliation Account - LFB1-AKONT

    To Update LFB1-AKONT, on Create or change of Vendor based on some criteria , I have tried using the BADI
    SAPMF02K ( Used only for Checking data)
    and the BTE 00001421     VENDOR MASTER DATA: Save with data transfer Also does not work.
    Have set the values inside and the update indicator, still not working. Am I missing somethign?
    Please suggest a solution.
    Thanks,
    Vinotha M

    Check badi VENDOR_ADD_DATA
    method PRESET_VALUES_CCODE

  • Addition of a field in vendor master table at company code level

    Hi Champs,
    My requirement is to add a field in LFB1 table.
    I have added the field in the table using append structure, that was fine.
    I need to add the same for input/output on the screen 215 of program SAPMF02K (for the screen of Payment transaction Accounting at company code level).
    As far as I know there are only screen enhancements for Vendor master(no screen exits). The screen enhacements are  "Prepare Modification-Free Enhancement in Vendor Master Record". But using that i need to create a subscreen, but in my requirement I need to add the field on the same screen.
    Is there any solution for that???
    Please let me know if my doubt is not clear.
    Regards,
    Nishant

    Hi Krish,
    I am not able to find the screen exit for my requirement.There is only screen enhancement for Vendor master.If you have any idea of the same pls let me know.
    I am ok with the solution that i need to change in the standard screen using access key,  but do i need to code anything in the PAI or PBO of the screen or it will be taken care automatically. Details of the program and screen is already given.
    Thanks
    Reagrds,
    Nishant

  • Vendor Master Update

    Hi,
    My requirement is to interface with leagacy system the vendor master data . For this i am using RFBIKR00 in my z-prg. The structures that are getting passed are BGR00, BLF00, BLFA1, BLFB1... In structure BLF00 I am getting the T-code & the Vendor number ... The inputfile is coming with t-code XK01... My program changes t-code to XK02 if vendor is already pressent in LFA1 & LFB1 ... but my program is failing when the vendor num exists in LFA1 but not in LFB1...because the t-code remains XK01 & when the session is created at that it throws an error saying "XK01" ... Vendor already exists... & If I check for vendors only in LFA1... the t-code chages to XK02 ... but in SM35 it gives an error saying Vendor -
    has not being created for company -
    .... Please help me to figure out how do I handle this type of situation... Also please tell me that in real time can there be a reverse situation ??... means Vendor present in LFB1 but not in LFA1 ?? ... I am also encloing my code below :-
    Select vendors number from LFA1 & then from LFB1
    FORM GET_VENDOR_NUMBER .
      SELECT LIFNR
             KTOKK
        INTO TABLE T_VENDOR
        FROM LFA1 CLIENT SPECIFIED
        WHERE MANDT = SY-MANDT AND
              KTOKK = C_KTOKK.
      IF SY-SUBRC <> 0.
        MESSAGE I010.    " No vendor found
      ELSE.
        SORT T_VENDOR BY LIFNR KTOKK.
        IF NOT T_VENDOR[] IS INITIAL.
          SELECT LIFNR
                 BUKRS
             INTO TABLE T_CCVENDOR
             FROM LFB1 CLIENT SPECIFIED
             FOR ALL ENTRIES IN T_VENDOR
             WHERE MANDT = SY-MANDT   AND
                   LIFNR = T_VENDOR-LIFNR AND
                   BUKRS = C_BUKRS.
          IF SY-SUBRC = 0.
            SORT T_CCVENDOR BY LIFNR BUKRS.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.                    " GET_VENDOR_NUMBER
          Perform to process the logic
    FORM PROCESS_FILES .
    Open the file
      LOOP AT T_LISTFILES.
        CONCATENATE C_DIRFILES
                    T_LISTFILES-NAME
               INTO V_FILEPATH.
        OPEN DATASET V_FILEPATH FOR INPUT IN TEXT MODE ENCODING DEFAULT
                                                  MESSAGE V_MSG.
       WRITE: V_FILEPATH.
        IF SY-SUBRC <> 0.
          MESSAGE I008.              "'File cannot be opened.
          EXIT.
        ENDIF.
    Reading the file.
        DO.
          READ DATASET V_FILEPATH INTO T_INPUTFILE.
          IF SY-SUBRC <> 0.
            EXIT.
    Capture session name.
          ELSEIF T_INPUTFILE+0(1) = '0'.
            V_SESS_NAME = T_INPUTFILE+1(12).
    Get Vendor account group info
          ELSEIF T_INPUTFILE0(1) = '1' AND T_INPUTFILE1(4) = 'XK01'.
            READ TABLE T_RECACC WITH KEY Z_INTERFACE = 'RB'.
            IF SY-SUBRC = 0.
              T_INPUTFILE+39(4) = T_RECACC-Z_KTOKK.
            ENDIF.
    Check for vendor number.
            READ TABLE T_CCVENDOR WITH KEY LIFNR = T_INPUTFILE+21(10)
                                           BUKRS = C_BUKRS.
            IF SY-SUBRC = 0.
              T_INPUTFILE+1(4) = 'XK02'.
            ENDIF.
          ENDIF.
          APPEND T_INPUTFILE.
          CLEAR  T_INPUTFILE.
        ENDDO.
    Close the file.
        CLOSE DATASET V_FILEPATH.

    Hi Rob,
      It gave an error for the 1st record where t-code got changed to XK02 as Vendor -
    has not been created for company code -
      The second record gave an error saying that "No batch input data for screen SAPMF02K 0111" , which means it could not find the general data ... I inquired here & they told me that I should pass the input file as :-
    0Sessname  210usernam       00000000X/
    1XK01                00001000151001/
    2BLFB1                                   /
    But my incoming flat file will have the records in this format:-
    0Sessname  210usernam       00000000X/
    1XK01                00001000151001/
    2BLFA1                         /
    2BLFB1                                   /
    Currently I want to know that if my record pointer is in record 1XK01 line ... how should it skip directly to 2BLFB1 line ...
    If I follow the below code ... it errors saying that general data it not found "No batch input data for screen SAPMF02K 0111"
    Check for the condition vendor number present in LFA1 but not in LFB1
            READ TABLE T_VENDOR WITH KEY LIFNR = T_INPUTFILE+21(10)
                                         KTOKK = C_KTOKK.        "check LFA1
            IF SY-SUBRC = 0.
              READ TABLE T_CCVENDOR WITH KEY LIFNR = T_INPUTFILE+21(10)
                                            BUKRS = C_BUKRS.    "check LFB1
              IF SY-SUBRC <> 0.
                APPEND T_INPUTFILE.
                CLEAR T_INPUTFILE.
                READ DATASET V_FILEPATH INTO T_INPUTFILE.
                  IF SY-SUBRC = 0.
                   IF T_INPUTFILE0(1) = '2' AND T_INPUTFILE1(5) = 'BLFA1'.
                     CONTINUE.
                   ENDIF.
                  ENDIF.
              ENDIF.
            ENDIF.
    So i believe I should not do a read instea directly skip the line of 1BLFA1 & directly go to 2BLFB1 record line...
    Can you help me please....
    Thank you,
    SB.

  • How to upload a text in the customer master?

    hiall,
    in vd02 u go to extras->texts.
    Now I have to upload a text there..
    so i passed the text objetct-knvv
                                   name-kunnrvkorgvtweg+spart
                                   id-the rewuired agains which i have to upload
                                   lang-en
    i used fm save_text in badi method read_add_on_data in prog sapmvf02d.
    though the fm is working but when i am executing vd02 again the text is not appearing in vd02..Can u help me with this..

    Hi,
            Upload Program for Xk01 ..
    REPORT Y730_BDC5 .
    DATA : BEGIN OF IT_DUMMY OCCURS 0,
           DUMMY(100) TYPE C,
           END OF IT_DUMMY.
    DATA : BEGIN OF IT_XK01 OCCURS 0,
           LIFNR(10) TYPE C,
           BUKRS(4)  TYPE C,
           EKORG(4)  TYPE C,
           KTOKK(4)  TYPE C,
           NAME1(30) TYPE C,
           SORTL(10) TYPE C,
           LAND1(3)  TYPE C,
           SPRAS(2)  TYPE C,
           AKONT(6)  TYPE C,
           FDGRV(2)  TYPE C,
           WAERS(3)  TYPE C,
           END OF IT_XK01,
           BEGIN OF IT_BANK OCCURS 0,
           BANKS(3)  TYPE C,
           BANKL(10) TYPE C,
           BANKN(10) TYPE C,
           KOINH(30) TYPE C,
           LIFNR(10) TYPE C,
           END OF IT_BANK.
    DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
           IT_BDCMSGCOLL LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
       FILENAME                      = 'C:\VENDOR.TXT'
       FILETYPE                      = 'ASC'
    TABLES
       DATA_TAB                      = IT_DUMMY.
    LOOP AT IT_DUMMY.
      IF IT_DUMMY-DUMMY+0(2) = '11'.
        IT_XK01-LIFNR = IT_DUMMY-DUMMY+2(10).
        IT_XK01-BUKRS = IT_DUMMY-DUMMY+12(4).
        IT_XK01-EKORG = IT_DUMMY-DUMMY+16(4).
        IT_XK01-KTOKK = IT_DUMMY-DUMMY+20(4).
        IT_XK01-NAME1 = IT_DUMMY-DUMMY+24(30).
        IT_XK01-SORTL = IT_DUMMY-DUMMY+54(10).
        IT_XK01-LAND1 = IT_DUMMY-DUMMY+64(3).
        IT_XK01-SPRAS = IT_DUMMY-DUMMY+67(2).
        IT_XK01-AKONT = IT_DUMMY-DUMMY+69(6).
        IT_XK01-FDGRV = IT_DUMMY-DUMMY+75(2).
        IT_XK01-WAERS = IT_DUMMY-DUMMY+77(3).
        APPEND IT_XK01.
      ELSE.
        IT_BANK-BANKS = IT_DUMMY-DUMMY+2(3).
        IT_BANK-BANKL = IT_DUMMY-DUMMY+5(10).
        IT_BANK-BANKN = IT_DUMMY-DUMMY+15(10).
        IT_BANK-KOINH = IT_DUMMY-DUMMY+25(30).
        IT_BANK-LIFNR = IT_DUMMY-DUMMY+55(10).
        APPEND IT_BANK.
      ENDIF.
    ENDLOOP.
    LOOP AT IT_XK01.
    REFRESH IT_BDCDATA.
    perform bdc_dynpro      using 'SAPMF02K' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF02K-REF_LIFNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RF02K-LIFNR'
                                  IT_XK01-LIFNR.
    perform bdc_field       using 'RF02K-BUKRS'
                                  IT_XK01-BUKRS.
    perform bdc_field       using 'RF02K-EKORG'
                                  IT_XK01-EKORG.
    perform bdc_field       using 'RF02K-KTOKK'
                                  IT_XK01-KTOKK.
    perform bdc_dynpro      using 'SAPMF02K' '0110'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-TELX1'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFA1-NAME1'
                                  IT_XK01-NAME1.
    perform bdc_field       using 'LFA1-SORTL'
                                  IT_XK01-SORTL.
    perform bdc_field       using 'LFA1-LAND1'
                                  IT_XK01-LAND1.
    perform bdc_field       using 'LFA1-SPRAS'
                                  IT_XK01-SPRAS.
    perform bdc_dynpro      using 'SAPMF02K' '0120'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-KUNNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0130'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFBK-KOINH(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    DATA : FNAM(20) TYPE C,
           IDX      TYPE C.
      MOVE 1 TO IDX.
    LOOP AT IT_BANK WHERE LIFNR = IT_XK01-LIFNR.
      CONCATENATE 'LFBK-BANKS(' IDX ')' INTO FNAM.
      perform bdc_field       using FNAM
                                    IT_BANK-BANKS.
      CONCATENATE 'LFBK-BANKL(' IDX ')' INTO FNAM.
      perform bdc_field       using FNAM
                                    IT_BANK-BANKL.
      CONCATENATE 'LFBK-BANKN(' IDX ')' INTO FNAM.
      perform bdc_field       using FNAM
                                    IT_BANK-BANKN.
      CONCATENATE 'LFBK-KOINH(' IDX ')' INTO FNAM.
      perform bdc_field       using FNAM
                                    IT_BANK-KOINH.
      IDX = IDX + 1.
    ENDLOOP.
    perform bdc_dynpro      using 'SAPMF02K' '0130'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFBK-BANKS(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_dynpro      using 'SAPMF02K' '0210'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFB1-FDGRV'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFB1-AKONT'
                                  IT_XK01-AKONT.
    perform bdc_field       using 'LFB1-FDGRV'
                                  IT_XK01-FDGRV.
    perform bdc_dynpro      using 'SAPMF02K' '0215'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFB1-ZTERM'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0220'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFB5-MAHNA'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0310'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFM1-WAERS'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFM1-WAERS'
                                  IT_XK01-WAERS.
    perform bdc_dynpro      using 'SAPMF02K' '0320'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'WYT3-PARVW(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=YES'.
    CALL TRANSACTION 'XK01' USING IT_BDCDATA
                            MODE  'A'
                           UPDATE 'S'
                         MESSAGES INTO IT_BDCMSGCOLL.
    ENDLOOP.
    FORM BDC_DYNPRO USING PROG SCR.
      CLEAR IT_BDCDATA.
      IT_BDCDATA-PROGRAM = PROG.
      IT_BDCDATA-DYNPRO  = SCR.
      IT_BDCDATA-DYNBEGIN = 'X'.
      APPEND IT_BDCDATA.
    ENDFORM.
    FORM BDC_FIELD USING FNAM FVAL.
      CLEAR IT_BDCDATA.
      IT_BDCDATA-FNAM = FNAM.
      IT_BDCDATA-FVAL  = FVAL.
      APPEND IT_BDCDATA.
    ENDFORM.
    Regards

  • Standard screen changes-addition of a field in vendor master table

    Hi Champs,
    My requirement is to add a field in LFB1 table.
    I have added the field in the table using append structure, that was fine.
    I need to add the same for input/output on the screen 215 of program SAPMF02K (for the screen of Payment transaction Accounting at company code level).
    The screen enhancement available for vendor master is for adding a new sub screen. But I need my field to be input/output on screen 215 of program SAPMF02K (for the screen of Payment transaction Accounting at company code level).
    The only option left with me was to make changes in the Standard SAP screen as there are no enhancements available to suffice my requirement.
    After taking the access key, if suppose i make changes in the standard screen viz. given a dictionary refrence to the new field created on screen 215. My query is do i need  to do any kind of coding in PBO or PAI of the screen.
    A quick reply would be overwhelming.
    Thanks
    Regards,
    Nishant

    Ofcouse Nishanth, u need to code in PBO and PAI event.
    PAI   -> To read the User input and for doing validations or some thing as per ur requirement
    Hope this helps,
    Shiva kankanala

  • Error in my BDC SESSION METHOD

    Hi,
    I was trying work on BDC SESSION METHOD AND MY TCODE IS XK01.
    Here is my code can some one tell me where i am doing wrong becoz its not giving the output as I expected. And I am uploading a tab delimeter file.
    report ZAN_BDCVENDOR
           no standard page heading line-size 255.
    include bdcrecx1.
    DATA: I_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF RECORD OCCURS 0,
    LIFNR(016),
    BURKS(004),
    EKORG(004),
    KTOKK(004),
    AKONT(010),
    FDGRV(010),
    WAERS(005),
    END OF RECORD.
    start-of-selection.
    perform open_group.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = 'C:\VENDOR.TXT'
    FILETYPE                      = 'ASC'
      tables
        data_tab                      = RECORD
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT RECORD.
    perform bdc_dynpro      using 'SAPMF02K' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'USE_ZAV'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RF02K-LIFNR'
                                  '8765'.
    perform bdc_field       using 'RF02K-BUKRS'
                                  '1000'.
    perform bdc_field       using 'RF02K-EKORG'
                                  '1000'.
    perform bdc_field       using 'RF02K-KTOKK'
                                  '0001'.
    perform bdc_field       using 'USE_ZAV'
                                  'X'.
    perform bdc_dynpro      using 'SAPMF02K' '0210'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFB1-FDGRV'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=UPDA'.
    perform bdc_field       using 'LFB1-AKONT'
                                  '160000'.
    perform bdc_field       using 'LFB1-FDGRV'
                                  'A1'.
    perform bdc_dynpro      using 'SAPMF02K' '0310'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFM1-WAERS'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=UPDA'.
    perform bdc_field       using 'LFM1-WAERS'
                                  'usd'.
    perform bdc_transaction using 'XK01'.
    ENDLOOP.
    perform close_group.
                  CALL FUNCTION 'BDC_OPEN_GROUP'
                   EXPORTING
                    CLIENT                    = SY-MANDT
                    DEST                      = FILLER8
                     GROUP                     = 'SESSION1'
                    HOLDDATE                  = FILLER8
                    KEEP                      = FILLER1
                     USER                      = SY-UNAME
                    RECORD                    = FILLER1
                    PROG                      = SY-CPROG
                  IMPORTING
                    QID                       =
                  EXCEPTIONS
                    CLIENT_INVALID            = 1
                    DESTINATION_INVALID       = 2
                    GROUP_INVALID             = 3
                    GROUP_IS_LOCKED           = 4
                    HOLDDATE_INVALID          = 5
                    INTERNAL_ERROR            = 6
                    QUEUE_ERROR               = 7
                    RUNNING                   = 8
                    SYSTEM_LOCK_ERROR         = 9
                    USER_INVALID              = 10
                    OTHERS                    = 11
                  IF sy-subrc <> 0.
                  WRITE 'ERROR IN OPEN_GROUP'.
                  ENDIF.
                   CALL FUNCTION 'BDC_INSERT'
                   EXPORTING
                     TCODE                  = TCODE
                     POST_LOCAL             = NOVBLOCAL
                     PRINTING               = NOPRINT
                     SIMUBATCH              = ' '
                     CTUPARAMS              = ' '
                     TABLES
                       dynprotab              = I_BDCDATA
                   EXCEPTIONS
                     INTERNAL_ERROR         = 1
                     NOT_OPEN               = 2
                     QUEUE_ERROR            = 3
                     TCODE_INVALID          = 4
                     PRINTING_INVALID       = 5
                     POSTING_INVALID        = 6
                     OTHERS                 = 7
                   IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
                   ENDIF.
                   CALL FUNCTION 'BDC_CLOSE_GROUP'
                   EXCEPTIONS
                     NOT_OPEN          = 1
                     QUEUE_ERROR       = 2
                     OTHERS            = 3
                   IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
                   ENDIF.
    I appreciate

    Hi,
    i guess, the error is due to, u didnt pass the TCODE parameter in BDC_INSERT FM.
    Try by passing it...
    CALL FUNCTION 'BDC_INSERT'
    EXPORTING
    TCODE = TCODE*
    POST_LOCAL = NOVBLOCAL
    PRINTING = NOPRINT
    SIMUBATCH = ' '
    CTUPARAMS = ' '
    TABLES
    dynprotab = I_BDCDATA
    EXCEPTIONS
    INTERNAL_ERROR = 1
    NOT_OPEN = 2
    QUEUE_ERROR = 3
    TCODE_INVALID = 4
    PRINTING_INVALID = 5
    POSTING_INVALID = 6
    OTHERS = 7
    Hope it works!!
    Regards,
    Pavan

Maybe you are looking for