GL Code recording

Hi Experts,
I want to do recording for a GL code creation.I am facing issues for different account groups with different field status.If I record for a specific account group,It may not be suitable for other groups.I want to record for all the fields.So please guide me as how to identify the account group which will have all fields open.I don't have any such account group in my chart of accounts.Please guide

Hi,
BDC recording will be difficult to cover all account groups.
You can instead use the below tools:-
(1) Function module 'GL_ACCT_MASTER_SAVE', where you can pass the relevant data
Or
(2) Program RFBISA00 (Can read the documentation of this program to get more details.)
Regards,
SDNer

Similar Messages

  • Tax Code record

    I have created new tax codes using FTXP, Now i want to define the % for these tax code. where and how i will do this. Then i want to pick the % defined for these tax codes into my condition record which i am creating using vk11. Please guide me for the same.
    Regards
    Rishi

    Dear Rishi
    If you are in TAXINJ, all tax codes and the relevant percentage values should be maintained in FTXP.  If you are in TAXINN, the relevant percentage values should be maintained in VK19
    thanks
    G. Lakshmipathi

  • How to stop report updating the records

    Morning all,
    I have created a report which calculates reworked jobs according to a group (reason code). I later on added a sub report which calculates all the jobs (that is all the processed jobs). The sub report is linked with main report by Reason code.
    Reason Code 1 to 99 in main report is linked with the reason code 1 to 99 in the sub report.
    There are 9 specified reason codes. for example
    Customer care - 1-99 reason code -  This reason code total processed orders value is the same as Supplier.
    Lab Surfacing - 200-299 reason code -
    Lab Tinting - 400-499 reason code -
    Hard Coating - 800-899 reason code - 
    Supplier etc. - 900-99 reason code - This reason code total processed orders value is the same as CstCare.
    When the report runs, it calculates the value of the first group 1-99, sub report counts the total processed orders and displays the value (upto here it is fine). As the report goes on reading records, it updates the values and shows an updated value in some groups which needs to be the same as the first group value.
    For example
    If Customer Care had 470 processed orders, by the time it reaches Supplier it shows 507 processed orders, where as it should have kept it to 470 processed orders for Supplier group as both should have same value of orders processed.
    The report is running fine however the records which are being pulled from the sub report gets updated by the time report finish counting all the records.
    The main reason why it is doing is because it starts recounting on each group reason code. So when it sets off from reason code 1 to 99, it calculates all the records and then filters them to get 1 to 99 reason code records. Then when it comes to 100-199 group it starts recounting again all the records. The process kept itself until it stops matching reason codes between two reports.
    Any ideas how to process all the records at once from the sub report? so that each time it looks for the record, it just picks what has been processed?
    I suspect instead of keeping it on the group level I should move the sub reports on the header of the main report?
    Any ideas will be welcomed.
    Regards
    Jehanzeb

    Hi J,
    This is not possible in Crystal, as you are well aware that when it is processing a group in the report, it will process that particular group objects like sub totals, group totals, sub reports etc.  You can't pull all information (sub report) at once and show in bits and pieces.
    You may have to create an intermediate database and replicate the data from your main database in certain intervals.  It will help you to prevent different count in groups.
    Thanks,
    Sastry

  • Microphone sound recording,saving,playing flv file is saved but not working

    Please help me,
              While recording the flv is saved inside applications/stream/samples/audio.flv. But it is not working properly.
    Mycode
    stop();   
          var count:Number          = 0;
          var timestamp:Date    = new Date();
          var nc:NetConnection       = new NetConnection();
          nc.connect("rtmp://localhost/audiotest/samples");
          var ns:NetStream          = new NetStream(nc);
            ns.setBufferTime(2);
          var mic:Microphone    = Microphone.get();
          mic.setRate(22);
          ns.attachAudio(mic);
          ns.onStatus = function($info:Object):Void
              trace($info.code);
          // record the audio to the stream
          function recordAudio():Void
              var fileName:String = String(timestamp.getTime() + (count++));
           ns.publish(fileName, "record");
          // stop the recording of audio to the stream
          function stopRecordingAudio():Void
              ns.publish(false);
          // plays back the audio that was recorded
          function playRecordedAudio():Void
              ns.play(currentFileName);
          // record button
          recordBtn_mc.onRelease = function():Void
              recordAudio();
          // stop button
          stopBtn_mc.onRelease = function():Void
              stopRecordingAudio();
          // play button
          playBtn_mc.onRelease = function():Void
              playRecordedAudio();

    Try changing the fileName:String to a simpler string name like "myAudio"....then try playing it.....if it works doing that....then the issue is with you converting that date variable to a string.......and if thats the problem try converting the value with   .toString() seperately and adding

  • Problems updateing a record on mdm

    Hi All,
    I am developing a solution in Web Dynpro to update the text of a product in mdm  5 sp6 using mdm api.
    I have no compilation errors neither runtime errors.
    I run the command to modify a record but nothing is changing in mdm.
    Can you helpme with it ? i have urgence in this solution.
    here is my code:
    Record rec = materialDao.searchMaterial(matSearchDTO);
    ConnectionAccessor conn = control.getConnection();
    //Fazer checkout do registro
    try {
         JoinCheckoutRecordsCommand outCmd = new JoinCheckoutRecordsCommand(conn);
         outCmd.setSession(control.getUserSession());
         outCmd.setTableId(tableIdTProdutos);
         outCmd.addRecordId(rec.getId());
         outCmd.execute();
    } catch (Exception e) {
         //nao fazer nada pois o registro ja esta com checkout
    //ALTERAR OS DADOS
    if (multiTextoCurto != null)
         rec.setFieldValue(fieldIdTextoCurto, multiTextoCurto);
    if (multiTextoLongo != null)
         rec.setFieldValue(fieldIdTextoLongo, multiTextoLongo);
    if (mdmUnidadeBasica != null)
         rec.setFieldValue(fieldIdUnidadeBasica, mdmUnidadeBasica);
    if (mdmUnidadePeso != null)
         rec.setFieldValue(fieldIdUnidadePeso, mdmUnidadePeso);
    if (mdmUnidadeVolume != null)
         rec.setFieldValue(fieldIdUnidadeVolume, mdmUnidadeVolume);
    if (mdmPesoBruto != null)
         rec.setFieldValue(fieldIdPesoBruto, mdmPesoBruto);
    if (mdmPesoLiquido != null)
         rec.setFieldValue(fieldIdPesoLiquido, mdmPesoLiquido);
    if (mdmVolume != null)
         rec.setFieldValue(fieldIdVolume, mdmVolume);
    if (mdmDadoComplementario != null)
         rec.setFieldValue(fieldIdDadoCoplementario, mdmDadoComplementario);
    //Modificar o registro
    ModifyRecordCommand cmd = new ModifyRecordCommand(conn);
    cmd.setRecord(rec);
    cmd.setSession(control.getUserSession());
    cmd.setModifyAnyway(true);
    cmd.execute();

    Diego, if this is the actual code, you have suppressed the exceptions by keeping the catch block empty.
    Also keep your modify command statement in try / catch.
    I would personaly test it by adding following steps:
    Print the connection parameter, make sure connection is successful
    Print the old values or one of the old values and the new value of a field to make sure you are sending the proper values.
    Put a systemout/reportsuccess after execute and / or to make sure execute is done properly.
    If everything is fine, just verify the update stamp of the record to verify if the record is getting updated or not. If the update stamp is not updated, that means the command never got executed properly.
    Regards,
    Nitin

  • How to get Fieldvalue From Record Id in MDM

    Hello All,
    I have 2 questions:
    1)Can you please tell me how to get the Field value from the Record Id (R1,R2,R3,R4....etc).
    i know How to get the field value by passing the field id in the record.
    Ex:record.getFieldValue(fieldProp4.getId()).
    Is thereb any way that i can get  the Field value by passing record id as parameter.
    2)I am trying t populate the look up field value (From look up table) in the main table.
    Can you please suggest How to get the lookup field value (From look up table) in the main table.
    Regards
    -sandip

    Hi Sandeep,
    Your first requirement can be solved by using below code.
    record.getLookupDisplayValue(fieldProp4.getId()).
    instead of using
    record.getFieldValue(fieldProp4.getId()).
    Can you please elaborate ur second requirement, do you want to modify any lookup value of record and want to save in MDM.
    Regards,
    Rohit

  • Syndicate only certain Tuple Records

    Hi Experts,
    We are using MDM 7.1 SP03. Is there any way that I can syndicate only certain tuple records?
    Example:
    Customer Master has two Purchase Organization records inside a multi-valued Purchase Organization Tuple. One record uses Purchase Org code = 4100 and the other record uses Purchase Org = 4005. Is there any way to syndicate out only the Purchase org record with code 4100?
    I have tried to use the filtering options in the syndicator: Filter Qualified Links and Filter Multi-valued Lookup fields. This does not work.
    I have the search parameters set to Customer records with Purchase org = 4100, and the customer record has two tuple records (4100 and 4005) the syndicator will push out both records. I only want the 4100 record to push out. Please help!
    Edited by: Matthew Winchester on Feb 3, 2011 5:01 PM

    -These records are not Remote System specific.-
    -The search criteria using expressions do not work-
    Example XML Structure:
    <Account_Group>Z001</Account_Group>
      <Name_1>Test, Inc</Name_1>
      <Search_Term_1>HQ</Search_Term_1>
      <Search_Term_2>Serach One</Search_Term_2>
      <Street>Main Rd</Street>
      <House_Number>300</House_Number>
      <City_Postal_Code>12345</City_Postal_Code>
      <City>Cumming</City>
      <Country>US</Country>
      <Region>GA</Region>
      <Address_Time_Zone>EST</Address_Time_Zone>
      <Transportation_Zone>XXX3432</Transportation_Zone>
      <Language>E</Language>
      <Remote_Key />
      <Tax_Number_2>5464654654654</Tax_Number_2>
    - <Vendor_Company_Code_Data>
      <Company_Code>4005</Company_Code>
      <Reconciliation_Account>4100000</Reconciliation_Account>
      <Sort_Key>009</Sort_Key>
      <Payment_Term>ZD22</Payment_Term>
      <Double_Invoice>X</Double_Invoice>
      <Payment_Term_Credit_Memos>ZD22</Payment_Term_Credit_Memos>
      <Payment_Method>F</Payment_Method>
      <Vendor_Withholding_Tax_Data />
      </Vendor_Company_Code_Data>
    - <Vendor_Company_Code_Data>
      <Company_Code>1700</Company_Code>
      <Reconciliation_Account>4100000</Reconciliation_Account>
      <Sort_Key>009</Sort_Key>
      <Payment_Term>ZD22</Payment_Term>
      <Double_Invoice>X</Double_Invoice>
      <Payment_Term_Credit_Memos>ZD22</Payment_Term_Credit_Memos>
      <Payment_Method>F</Payment_Method>
      <Vendor_Withholding_Tax_Data />
      </Vendor_Company_Code_Data>
    Senario: I export this entire record out using the syndicator. When importing into a different repository is there a way that i can ignore the segment with Company Code 4005, and only create the segment for company code 4100? It would be great to be able to handle this automatically....any sugestions? I need to be able to filter out certain company code records from importing, since there is no way to filter out during syndication, can this be handled using the Import Manager?
    Edited by: Matthew Winchester on Feb 3, 2011 10:27 PM

  • Trigger to copy records from one table to another;  ORA-04091:

    Hello,
    I'm trying to create a trigger that will move data from one table to another.
    I have two tables (Trial1, Trial2) Both of them contains the same attributes (code, c_index)
    I want to move each new record inserted in (code in Trial1) to (code in Trial2)
    This is my trigger:
    Create or replace trigger trg_move_to_trial2
    After insert on Trial1
    for each row
    begin
    insert into Trial2 (code)
    select :new.code from Trial1;
    end;It compiled, but when I insert new (code) record into (Trial1) it display this error:
    Error report:
    SQL Error: ORA-04091: table STU101.TRIAL1 is mutating, trigger/function may not see it
    ORA-06512: at "STU101.TRG_MOVE_TO_TRIAL2", line 3
    ORA-04088: error during execution of trigger 'STU101.TRG_MOVE_TO_TRIAL2'
    04091. 00000 - "table %s.%s is mutating, trigger/function may not see it"
    *Cause:    A trigger (or a user defined plsql function that is referenced in
    this statement) attempted to look at (or modify) a table that was
    in the middle of being modified by the statement which fired it.
    *Action:   Rewrite the trigger (or function) so it does not read that table.I know what does this error mean, but I don't how to fix the error.
    I tried to change the (After insert on Trial1) to be (Before insert on Trial1); that worked, but not in the right way. When I insert new value into (code in Trial1) and refreshed Trial2 table, as much as records I have in Trial 2 they will be duplicated. E.g.
    Trial2
    code
    111
    222
    333when I insert in Trial1
    Trial1
    code
    444
    Trial2 will be:
    code
    111
    222
    333
    444
    444
    444Can you please tell me how to solve this issue?
    Regards,
    Edited by: 1002059 on Apr 23, 2013 5:36 PM

    You should not select from Trial1 - you have the data already. Just insert that value.
    Create or replace trigger trg_move_to_trial2
    After insert on Trial1
    for each row
    begin
    insert into Trial2 (code)
    values (:new.code);
    end; regards,
    David

  • Options for Displaying Reference Attribute in AdvancedTable Record

    Hi,
    I'm looking for options for including reference attributes within an advanced table records as just another column.  Specifically how can I include a lookup meaning column in a detail advancedtable component when the lookup meaning is not in the VO?
    Some options I've thought of are:
    1. Change the VO to be defined with the lookup meaning by using "Expert Mode" and adding the joins.  This will not work because I need to change detail VO attribute via a controller/am method and (due to a bug) the change will not be saved to the database.
    2. Create an EO for the lookup entity and an AO to associate the detail EO with the lookup EO.  Then create a VO that is based upon both of these entities.  The problem I ran into with this option is that when the lookup code in the detail VO attribute is changed OAF tries to look for the old lookup code record in the detail VO and it will not find it and throws a error on the page.
    3. Create another detail advancedtable component in the detail VO advancedtable component.  Since I need the value within the detail advancedtable record and this would place it in a new detail this will not satisfy the requirement.
    Thank you

    If UOM is also changed with qty then old & new UOM should be available in CDHDR & CDPOS.
    If not then display current UOM.
    This logic will fail if UOM is also changed several times without changing Qty, which normally does not happen. So you can confirm with business, if this much info is enough.
    Making logic to work in case UOM is also changed several times, would require quite complex logic & will affect performance badly.

  • Is Time Code retrievable?

    I captured HD footage from a noncontrollable device (Sony FX1000) via HDMI instead of Firewire.
    I notice that all clips start at zero time code regardless of where they were on the tape. Does Final Cut Pro have the actual tape time code stored somewhere? Can I tell FCP to display the real time code recorded on the tape instead of these new default numbers?
    Thanks.

    SOL, amigo. Once you enter the realm of uncontrollable device, you say goodbye to source timecode.

  • BDC Recording - IL02

    Hi,
    I'm new to abap.  Hope any expert able to help me out.
    I'm doing upload program to link the document to functional location via BDC recording IL02.
    1) How i proceed to check the floc is whether exist in the system?
    2) Display the out the floc name if not exist.
    3) skip/ delete this floc and proceed rest of uploading.
    Below are part of my code & recording. Appreciate can provide guide code to me.
    Thanks!!
    <u><b>Internal Table:</b></u>
    DATA : BEGIN OF i_input OCCURS 0,
            tplnr LIKE iflo-tplnr,         "Functional Location
            dokar LIKE draw-dokar,   "Document Type
            doknr LIKE draw-doknr,   "Document
            doktl LIKE draw-doktl,     "Document Part
            dokvr LIKE draw-dokvr,    "Document Version
    END OF i_input.
    <u><b>BDC Recording</b></u>
    FORM BDC_Functional_Location.
      DATA : wa_file LIKE i_input.
      IF NOT i i_input[] IS INITIAL.
        SORT  i_input BY tplnr.
        LOOP AT i_input.
          wa_file = i_input.
          REFRESH i_bdcdata.
          CLEAR i_bdcdata.
        <u>Screen 1</u>
          PERFORM bdc_dynpro      USING 'SAPMILO0' '1110' c_on.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'IFLO-TPLNR'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM bdc_field       USING 'IFLO-TPLNR'
                                        wa_file-tplnr.
        <u>Screen 2</u>
          PERFORM bdc_dynpro      USING 'SAPMILO0' '2100' c_on.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'IFLO-PLTXT'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=T\05'.
        <u>Screen 3</u>
          PERFORM bdc_dynpro      USING 'SAPMILO0' '2100' c_on.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=CV140_INS'.
        <u>Screen 4</u>
          PERFORM bdc_dynpro      USING 'SAPMILO0' '2100' c_on.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'DRAW-DOKVR(01)'.
          PERFORM bdc_field       USING 'DRAW-DOKAR(01)'
                                        wa_file-dokar.
          PERFORM bdc_field       USING 'DRAW-DOKNR(01)'
                                        wa_file-doknr.
          PERFORM bdc_field       USING 'DRAW-DOKTL(01)'
                                        wa_file-doktl.
          PERFORM bdc_field       USING 'DRAW-DOKVR(01)'
                                        wa_file-dokvr.
          PERFORM bdc_field       USING 'GF_ALLE'
                                        'X'.
       <u>Screen 5</u>
          PERFORM bdc_dynpro      USING 'SAPMILO0' '2100' c_on.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=BU'.
          PERFORM bdc_transaction USING ' ' 'IL02' 'N'.
        ENDLOOP.
      ENDIF.
    ENDFORM.

    Hi All,
    Below is my code... I only need to update the cost center belongs to the affected functional location... Please help... Thanks.
    data:  PATH TYPE STRING,
           FULLPATH TYPE STRING,
           USER_ACTION  TYPE I,
           PCFILEX  TYPE STRING,
           g_pathresult TYPE string,
           g_file TYPE string.
    DATA: gt_fltab TYPE filetable,
          g_rcode  TYPE i.
    data:   DATALINE TYPE STRING.
           INFILE TYPE STANDARD TABLE OF STRING.
    data: begin of infile occurs 0,
              c1(30) type C,
              C2(10) type C,
          end of infile.
    DATA: IT_BDCDATA TYPE STANDARD TABLE OF BDCDATA,
          WA_BDCDATA TYPE BDCDATA.
    data: begin of it_final occurs 0,
              tplnr like bdcdata-fval,        "Function Location, iflo-tplnr
              kostl like bdcdata-fval,        "Cost Center, itob-kostl
             tplnr(25) type C,
             kostl(10) type C,
          end of it_final.
    *****include bdcrecx1.
    Selection screen
    PARAMETERS: p_fnam   LIKE rlgrap-filename OBLIGATORY.
    *initialization.
    At SELECTION-SCREEN
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fnam.
      INCLUDE yzz_incldefaultdir.
      MOVE: g_filename TO g_pathresult.
    Get filename for upload
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
      EXPORTING
          DEFAULT_FILENAME        = g_pathresult
      CHANGING
          file_table              = gt_fltab
          rc                      = g_rcode
          USER_ACTION             = USER_ACTION
      EXCEPTIONS
        FILE_OPEN_DIALOG_FAILED = 1
        CNTL_ERROR              = 2
        ERROR_NO_GUI            = 3
        NOT_SUPPORTED_BY_GUI    = 4
        others                  = 5.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        READ TABLE gt_fltab INDEX 1 INTO p_fnam.
      ENDIF.
    IF USER_ACTION EQ 0.
    g_file = p_fnam.
    CALL METHOD cl_gui_frontend_services=>gui_upload
       EXPORTING
         filename                = fullpath
         filetype                = 'ASC'
         has_field_separator     = 'X'
       CHANGING
         data_tab                = it_final[]
       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.
       IF SY-SUBRC <> 0.
         MESSAGE ID 'ZU' TYPE 'E' NUMBER '007' WITH p_fnam.
       ELSE.
         READ TABLE gt_fltab INDEX 1 INTO p_fnam.
       ENDIF.
    ENDIF.
    start-of-selection.
      perform f_upload.
    *perform open_group.
    *perform bdc_dynpro      using 'SAPMILO0' '1110'.
    *perform bdc_field       using 'BDC_CURSOR'
                                 'IFLO-TPLNR'.
    *perform bdc_field       using 'BDC_OKCODE'
                                 '/00'.
    *perform bdc_field       using 'IFLO-TPLNR'
                                 'AK31-AP1-010-B700  -B700'.
    *perform bdc_field       using 'RILO0-TPLKZ'
                                 'PMST1'.
    *perform bdc_dynpro      using 'SAPMILO0' '2100'.
    *perform bdc_field       using 'BDC_CURSOR'
                                 'IFLO-PLTXT'.
    *perform bdc_field       using 'BDC_OKCODE'
                                 '=T\03'.
    *perform bdc_field       using 'IFLO-PLTXT'
                                 'ABS WASTE WATER STORAGE TANK'.
    *perform bdc_dynpro      using 'SAPMILO0' '2100'.
    *perform bdc_field       using 'BDC_OKCODE'
                                 '=BU'.
    *perform bdc_field       using 'IFLO-PLTXT'
                                 'ABS WASTE WATER STORAGE TANK'.
    *perform bdc_field       using 'BDC_CURSOR'
                                 'ITOB-KOSTL'.
    *perform bdc_field       using 'ITOB-BUKRS'
                                 'KP01'.
    *perform bdc_field       using 'ITOB-KOSTL'
                                 'C68312'.
    *perform bdc_field       using 'ITOB-IWERK'
                                 'KP13'.
    *perform bdc_field       using 'ITOB-INGRP'
                                 'MP1'.
    *perform bdc_field       using 'ITOBATTR-GEWRK'
                                 'MECH #1'.
    *perform bdc_field       using 'ITOBATTR-WERGW'
                                 'KP13'.
    *perform bdc_field       using 'ITOB-RBNR'
                                 'M'.
    *perform bdc_transaction using 'IL02'.
    *perform close_group.
    *&      Form  begin
          text
         -->P_0191   text
         -->P_0192   text
         -->P_0193   text
    FORM begin  USING    PROG TYPE BDCDATA-PROGRAM     
                     DYNPRO TYPE BDCDATA-DYNPRO
                     DYNBEGIN TYPE BDCDATA-DYNBEGIN.
    CLEAR WA_BDCDATA.
    WA_BDCDATA-PROGRAM = PROG.
    WA_BDCDATA-DYNPRO = DYNPRO.
    WA_BDCDATA-DYNBEGIN = DYNBEGIN.
      CLEAR wa_BDCDATA.
      wa_BDCDATA-PROGRAM  = PROG.
      wa_BDCDATA-DYNPRO   = DYNPRO.
      wa_BDCDATA-DYNBEGIN = 'X'.
      APPEND WA_BDCDATA TO IT_final.
    APPEND WA_BDCDATA.
    ENDFORM.                    " begin
    *&      Form  info_tc
          text
         -->P_0197   text
         -->P_IT_FINAL_TPLNR  text
    FORM info_tc  USING    FNAM TYPE any
                       FVAL TYPE any.
      CLEAR WA_BDCDATA.
      WA_BDCDATA-FNAM = FNAM.
      WA_BDCDATA-FVAL = FVAL.
      APPEND WA_BDCDATA TO IT_final.
    ENDFORM.                    " info_tc
    *&      Form  f_upload
          text
    -->  p1        text
    <--  p2        text
    FORM f_upload .
      clear: g_file.
      g_file = p_fnam.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename            = g_file
          filetype            = 'ASC'
          has_field_separator = '|'
        TABLES
          data_tab            = infile
        EXCEPTIONS
          file_open_error     = 1
          file_read_error     = 2
          no_batch            = 3
          disk_full           = 4
          OTHERS              = 5.
        IF SY-SUBRC <> 0.
          MESSAGE ID 'ZU' TYPE 'E' NUMBER '007' WITH p_fnam.
        ENDIF.
        perform f_call_trans.
    ENDFORM.                    " f_upload
    *&      Form  f_call_trans
          text
    -->  p1        text
    <--  p2        text
    FORM f_call_trans .
    types:  begin of t_Data,
              C1 TYPE BDCDATA-FVAL,      "Material#
              C2 TYPE BDCDATA-FVAL,      "Industry Sect.
            end of t_data.
    DATA: C1 TYPE BDCDATA-FVAL,
          C2 TYPE BDCDATA-FVAL.
    data: IT_DATA TYPE STANDARD TABLE OF t_Data,
          WA_DATA like line of infile.
        LOOP AT infile INTO WA_DATA.
          CLEAR it_bdcdata. REFRESH it_bdcdata.
              PERFORM begin USING 'SAPMILO0' '1110' 'X'.
              perform info       using 'BDC_CURSOR' 'IFLO-TPLNR'.
              perform info       using 'BDC_OKCODE' '/00'.
              PERFORM info       USING 'IFLO-TPLNR' WA_DATA-C1.
              perform info       using 'BDC_OKCODE' '/00'.    "=BU
              PERFORM begin USING 'SAPMILO0' '2100' 'X'.
              perform info       using 'BDC_OKCODE' '/00'.    "=BU
             perform info using 'BDC_CURSOR' 'ITOB-KOSTL'.
              PERFORM info USING 'ITOB-KOSTL' WA_DATA-C2.
              perform info using 'BDC_OKCODE' '=YES'.
            CALL TRANSACTION 'IL02' USING it_FINAL MODE 'A' UPDATE 'L'.
        ENDLOOP.
    ENDFORM.                    " f_call_trans
    *&      Form  info
          text
         -->P_0397   text
         -->P_0398   text
    FORM info  USING  fnam type any
                      fval type any.
    *FNAM TYPE BDCDATA-FNAM
                      FVAL TYPE BDCDATA-FVAL.
                      VALUE(LINNO) TYPE I.
    CLEAR WA_BDCDATA.
    WA_BDCDATA-FNAM = FNAM.
    WA_BDCDATA-FVAL = FVAL.
        CLEAR wa_BDCDATA.
        wa_bDCDATA-FNAM = FNAM.
        wa_BDCDATA-FVAL = FVAL.
      APPEND WA_BDCDATA TO IT_final.
    APPEND WA_BDCDATA.
    ENDFORM.                    " info

  • Error while posting Customer with Multiple sales areas using DEBMAS05.

    Dear experts,
    We are generating IDOCS vis SAP DS for posting Customer master. The message type used is DEBMAS and basic type is DEBMAS05.  we have a requirement to create 1 customer with multiple sales areas. However, we are ending up with a strange error:  "Fill all required fields SAPMF02D 0111 ADDR1_DATA-NAME1". Despite the IDOC going into status 51, the customer gets created and the 1st sales area too. the 2nd sales area however is not created!  The IDOC data definitely contains Name1, otherwise the customer would not have been created in the first place.
    As the error message is related to the Address data, I also explored upon exploring this erorr further on the lines of Central Address management where in the ADRMAS and DEBMAS have to be passed together(IDOC Serialiization).  OSS Note (384462)  provides further details about this. One Important point from the note is: 
    "As you have to specify the logical name of the sending system among other things, SAP is not able to make any default settings in the standard systems. When you use the serialization groups delivered as a standard by SAP, the address objects are imported before the master objects.Thus the sequence address data before master objects must only be adhered to if one of the following points applies to your application:
    Such fields are set as required entry fields that are only provided by the BAS in the Customizing of the customer or vendor master.
    For your customers, contact persons exist to which a private address or a different business address is assigned.".
    This is not the case in our situation, as we do not have required entry fields in customizing that are only provided by the BAS, so the error is all the more confusing and I am not too sure what the cause is.
    If someone have experienced the same issue before and have found a solution to it, kindly help out.

    I have found the cause and solution to this problem.
    This error ”Fill all required fields SAPMF02D 0111 ADDR1_DATA-NAME1” and other similar errors like “Fill all required fields SAPMF02D 0111 ADDR1_DATA-SORT1“ which occurrs during the IDOC posting when there are more than one sales area or company code occurs when the customer number range is set up for Internal numbering. This means, that the number gets generated only at the time of save and upon debugging the IDOC, we found out that after creating the customer and the first sales area/company code record, the segment E1KNA1M is cleared completely! This is the reason, it throws an error which points to a mandatory KNA1 field as missing. (Like NAME1, SORT1 etc.)
    This was resolved by splitting the IDOC into 2.
    The solution is to First post only the KNA1 segment and create the customer.
    In the second step, pass the IDOC with all other segments along with E1KNA1M, but pass only KUNNR in E1KNA1M and the rest of the fields in E1KNA1M as “/”:  you would have got the KUNNR after the first step.
    Important note: This requirement to split the IDOCs does not occur when the customer number is known upfront. (Meaning cases where the customer number is externally generated) I also tested this and created a customer with external numbering and I was able to post more than 1 sales area with the same IDOC. 
    I noticed multiple threads with the same issue, but none of it had a concrete answer. I hope this information will be useful for anyone facing similar problems.
    Cheers
    Venkat

  • Loding data to dso from flatfile

    hi,
    while loading data to DSO from Flat file which fields should be mentiond in key fields and which fields should be mentioned in data fields.suppose,client,company code,record no,controllingarea,plant etc...... which flds sould be taken

    Hi,
    You can take the 0FISCPER, 0FISCVARNT, 0CURTYPE...etc are the Keyfileds.
    Rest of the fileds are Datafileds.
    Regards.

  • Compiler says class can't be initialized

    ok, i know abstract classes can't be initialized, but i am extending my base class, but my complier says that "class ClassificationParser can't be initialized" but i am not initializing it. IF anyone can point out a problem, which i just can't see please do. Thank you..
    first is listed the base abstract class, second the extended class
    package cattlemanager.utilities.parsers;
    import java.util.Vector;
    import java.io.File;
    import java.io.IOException;
    * Title:        ClassificationParser
    * Copyright:    Copyright (c) 2001
    * Company:      None
    * @author Harold Smith III
    * @version 1.0
    public abstract class ClassificationParser
       * <p>This method returns the instance of a <code>Classification</code> objects
       * that the implementor can work with and use to there own extent. This allows
       * for the parser to read in all the file data, and insert it into the
       * <code>Classification</code> Objects that he or she wishes the user to
       * modify.</p>
       * <p><strong>Important</strong> - The <code>Vector</code> that is returned will
       *  contain a <code>Vector</code> of <code>Vector</code>'s that the implementor
       *  must work with. The reason for a <code>Vector</code> of <code>Vector</code>'s
       *  is the <code>Classification</code> data may contain several past <code>
       *  Classification</code> records.</p>
       * @return Vector the data vector.
      public Vector getData()
      { return vInternalClassificationDataObject;
       * <code>parse</code> is the default parsing mechanism for the read in data
       * that the user can integrate into there records. Using the <code>parse</code>
       * method, the implemented class will read in the specified <code>File</code>
       * and the <code>Classification</code> Objects will be initialized with tthe
       * read in data.
       * @param File the file to be parsed, should follow the specified format
       *  determined by the appropriate association.
       * @throws WrongFormatException if the file is not formatted to the standards
       *  the association has laid out.
       * @throws IOException if there is a file problem.
      public abstract void parse(File fName) throws WrongFormatException, IOException;
       * The internal <code>Vector</code> of objects that will be laid out as specified
       * in the <code>getData</code> method described within this class.
       * @see #getData
      protected Vector vInternalClassificationDataObject;
    package cattlemanager.utilities.parsers;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.DataInputStream;
    import java.io.IOException;
    import java.io.EOFException;
    import java.util.StringTokenizer;
    import java.util.Date;
    import java.util.GregorianCalendar;
    * Title:        HolsteinAssociationClassificationParser
    * Copyright:    Copyright (c) 2001
    * Company:      None
    * @author Harold Smith III
    * @version 1.0
    public class HolsteinAssociationClassificationParser extends ClassificationParser
      private HolsteinAssociationClassificationParser()
      { try
        { parse(new File("demo.ext"));
        catch (Exception e)
       * Doesn't work?!
      public static synchronized ClassificationParser createInstance()
      { return new HolsteinAssociationClassificationParser();
       * <code>parse</code> parses the <a href="www.holstein.com">Holstein
       *  Association</a> classification data as laid out in there <code>File</code>
       *  format. By using this parser, one can read in the records and access the
       *  data that they need.
       * @param File the name of the file to be parsed.
       * @throws WrongFormatException if the file is not properly formated
      private void parse(File fName) throws WrongFormatException, IOException
        try {
          // READ IN FILE
       * Creates an instance of a date for the format specified by the Holstein
       * Association
      private Date createDate(String time)
      { GregorianCalendar c = (GregorianCalendar) GregorianCalendar.getInstance();
        c.set(Integer.parseInt(time.substring(0,4)), Integer.parseInt(time.substring(4,6))-1, Integer.parseInt(time.substring(6,8)));
        return c.getTime();
    }

    ah stupid errors, i figured it out, i accidently created an instance in a class before i decided to change the class to abstract!

  • Help in sql loader

    Hi Gurus
    i am trying to insert the data into table hr_detail and the data file (sqldata.xlsx) having the first column with NULL and other having data but some with NULL
    here i am getting this error and the data is getting load in single Column of the Table hr_detail
    Create Table hr_detail
    (NAME  Varchar2(1000),
    ID           Number(20),
    SOURCE Varchar2(1000),
    PERS_ID Number(20),
    FLAG   Varchar2(1000),
    KEY    Varchar2(1000)
    LOAD DATA
    INFILE 'C:\sqll\work\sqldata.xlsx'
    BADFILE 'C:\sqll\work\bad_data.txt'
    DISCARDFILE 'C:\sqll\work\discard_data.txt'
    INTO TABLE hr_detail
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    (NAME "TRIM(:NAME)",
    ID "TRIM(:ID)",
    SOURCE "TRIM(:SOURCE)",
    PERS_ID "TRIM(:PERS_ID)",
    FLAG "TRIM(:FLAG)",
    KEY "TRIM(:KEY)"
    sqlldr scott/pass control='C:\sqll\work\sqldataloader.ctl' log='C:\sqll\work\log_data.log'
    NAME       ID     SOURCE     PERS_ID  FLAG     KEY
         101     CORET     901          YJYYY
         102     CORET     902          
         103     CORET               AHERT
         104     CORET     904          QERET
    {code}
    {code}
    Record 1: Rejected - Error on table HR_DETAIL, column NAME.
    Field in data file exceeds maximum length
    Record 2: Rejected - Error on table HR_DETAIL, column PERS_ID.
    Field in data file exceeds maximum length
    Record 3: Rejected - Error on table HR_DETAIL, column NAME.
    Field in data file exceeds maximum length
    Record 4: Rejected - Error on table HR_DETAIL, column NAME.
    Field in data file exceeds maximum length
    Record 7: Rejected - Error on table HR_DETAIL, column SOURCE.
    Field in data file exceeds maximum length
    Record 12: Rejected - Error on table HR_DETAIL, column ID.
    Record 14: Rejected - Error on table HR_DETAIL, column ID.
    ORA-01722: invalid number
    Record 15: Rejected - Error on table HR_DETAIL, column ID.
    ORA-01722: invalid number
    {code}
    any help in this .. Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    fine ....The issue has been resolved

Maybe you are looking for

  • Using integers/characters as bookmarks in rtf document

    first of all, i am self taught (ie i know practically nothing) i am trying to write an application which includes a database and produces standard letters with individual clients' details inserted. it is driving me insane. i am using rtf files and th

  • Function Module Th_User_Info incorrect IP address

    Hello experts, While logging into system from some terminals,the system is throwing  exception 'MULTIPLE_TERMINAL_ID'. When checked, found that the exception is arising because of incorrect IP address being picked by the FM 'Th_User_Info'. Instead of

  • ICloud shared photo stream stopped working with new photo app

    iCloud shared photo stream stopped working since the last OX update with the new photo app.  I don't have access anymore to the sharing albums, even those that I own

  • How to parse the URI in ESB?

    Hi, Can we parse the stream of message sent as a "URI"? Basically from the remote machine PIPServelet is receiving a stream of message in the form of URI. as https://xxx.xxx.xxx:5555/<XMl>message_stream</XML> Message_stream : Any PIP or EDI sets. Now

  • Files to big

    Hi there!, Does anyone know who to compress swf files as i have just built a site and it takes a long while to display in the browser? Any ideas will help! thanks shayne