Maintenance View issues with an ABAP program

Hi,
I need to update a Maintenance view(V_JURIC) from a txt file. I created an ABAP module to do this and when I update the tables that compose the view(TABLE_A and TABLE_B), the view is not completely getting updated in the last field. Any suggestions? Here is  sample of the code:
REPORT zbr_loc_mast_data_1 MESSAGE-ID fb.
TABLES: j_1btxjurt,
        j_1btxjur.
DATA wa_j_1btxjurv TYPE j_1btxjurv.
DATA wa_j_1btxjurt TYPE j_1btxjurt.
DATA wa_j_1btxjur TYPE j_1btxjur.
DATA: BEGIN OF i_j_1btxjurt OCCURS 2000.
        INCLUDE STRUCTURE j_1btxjurt.
DATA: END OF i_j_1btxjurt.
DATA: i_j_1btxjurv LIKE j_1btxjurv OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF rec OCCURS 0,
      tbl_name(10)     TYPE c,        " Table name(Constant 'J_1BTXJURV')
      field_2(1)       TYPE c,        " Constant "X"
      jur_code(10)     TYPE c,        " Jurisdiction code
      municip(60)      TYPE c,        " Municipality Name
END OF rec.
DATA: w_num_recs TYPE i.
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.
PARAMETERS: in_file TYPE localfile OBLIGATORY
            DEFAULT 'C:\lista de municipios.txt'.
SELECTION-SCREEN END OF BLOCK block1.
START-OF-SELECTION.
  PERFORM read_file.
  IF sy-subrc = 0.
    PERFORM update_table.
  ENDIF.
END-OF-SELECTION.
*Summary
    WRITE: / 'Number of records read: ' COLOR COL_TOTAL INVERSE OFF INTENSIFIED ON,
         32 w_num_recs COLOR COL_POSITIVE INVERSE OFF
            INTENSIFIED ON.
*       Form  read_file
*       text
*  -->  p1        text
*  <--  p2        text
FORM read_file.
  DATA: l_filename TYPE string.
  MOVE in_file TO l_filename.
  CALL METHOD cl_gui_frontend_services=>gui_upload
    EXPORTING
      filename                = l_filename
      filetype                = 'DAT'
*      HAS_FIELD_SEPARATOR     = SPACE
*      HEADER_LENGTH           = 0
*      READ_BY_LINE            = 'X'
*      DAT_MODE                = SPACE
*      CODEPAGE                = SPACE
*      IGNORE_CERR             = ABAP_TRUE
*      REPLACEMENT             = '#'
*      VIRUS_SCAN_PROFILE      =
*    IMPORTING
*      FILELENGTH              =
*      HEADER                  =
    CHANGING
      data_tab                = rec[]
    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 e039 WITH in_file.
  ENDIF.
ENDFORM.                    " read_file
*       Form  update_table
*       text
*  -->  p1        text
*  <--  p2        text
FORM update_table.
  CLEAR: w_num_recs,
         w_num_recs_btable,
         w_num_recs_atable,
         w_num_recs_inserted.
    LOOP AT rec.
    w_num_recs = w_num_recs + 1.
    MOVE 'BR'          TO wa_j_1btxjur-country.
    MOVE rec-jur_code  TO wa_j_1btxjur-taxjurcode.
    MOVE 'PT'          TO wa_j_1btxjurt-spras.
    MOVE 'BR'          TO wa_j_1btxjurt-country.
    MOVE rec-jur_code  TO wa_j_1btxjurt-taxjurcode.
    MOVE rec-municip   TO wa_j_1btxjurt-text.
    INSERT into j_1btxjurt values wa_j_1btxjurt.
    IF sy-subrc = 0.
      COMMIT WORK.
    ENDIF.
    INSERT into j_1btxjur values wa_j_1btxjur.
    IF sy-subrc = 0.
      COMMIT WORK.
    ENDIF.
  ENDLOOP.
  ENDFORM.                    " update_table
Edited by: Thomas Zloch on Nov 5, 2010 9:24 AM - please use code tags

MOVE 'PT'          TO wa_j_1btxjurt-spras.
maybe change that to:
MOVE 'P'          TO wa_j_1btxjurt-spras.

Similar Messages

  • Issue with the ABAP program to find BI lookups and code Patterns

    Hello dears,
    I'm trying to use the ABAP program LOOKUP_FINDER:
    http://wiki.sdn.sap.com/wiki/display/BI/ABAPprogramtofindBIlookupsandcodePatterns
    But I have the following issue:
    Runtime Errors        
    RAISE_EXCEPTION
    Short text
        Exception condition "NO_FIELDCATALOG_AVAILABLE" raised.
    Error analysis
        A RAISE statement in the program "CL_GUI_ALV_GRID===============CP" raised the
         exception
        condition "NO_FIELDCATALOG_AVAILABLE".
        Since the exception was not intercepted by a superior
        program, processing was terminated.
    Source Code Extract
    Line  SourceCde
        1 method set_sort_criteria.
        2
        3 *... (1) Trace?
        4   if not mr_trace is initial.
        5     call method mr_trace->add_trace_item
        6       exporting
        7         i_trace_item = 'SET_SORT_CRITERIA'
        8         ir_variant   = m_cl_variant
        9         it_data      = mt_data
       10         it_info      = mt_info.
       11   endif.
       12
       13   if m_cl_variant->mt_fieldcatalog is initial.
    >>>>>     raise no_fieldcatalog_available.
       15   endif.
       16
       17   m_cl_variant->mt_sort = it_sort.
       18
       19   call function 'LVC_SORT_COMPLETE'
       20        exporting
       21             it_fieldcat = m_cl_variant->mt_fieldcatalog
       22        changing
       23             ct_sort     = m_cl_variant->mt_sort.
       24
       25 endmethod.
    This issue is located in the FM 'REUSE_ALV_GRID_DISPLAY' called at the end of the program.... maybe because the catalog is empty?
    For your information, I  called the program 'ZLOOKUP_FINDER'.
    Can you help me to fix this issue?
    Regards,
    Vince.

    Hi Vince,
    If a table is empty field catalog usually return no error it just display your field catalog with headers .
    I think the issue is with building of field catalog .
    May be some settings are missing there .
    Please check FM REUSE_ALV_FIELDCATALOG_MERGE where field catalog is getting generated.
    Regards,
    Jaya Tiwari

  • How to read an IDoc with an ABAP program?

    Hi experts!
    I am new to SAP and I need to read an IDoc with an ABAP program... how to do it?
    Maybe it is possible to read an IDoc into inner table...?
    Hellpful answers and advices will be rawarded.
    Regards,
    Mindaugas.

    hi
    I understand your issue, to pickup an IDOC flat file & post it to R/3 (with or without mapping).
    There is no straight forward solution but there are some ways (Normal way of Working as of now ?!!!) provided in the "How to"
    check this link
    https://websmp101.sap-ag.de/nw-howtoguides
    and look for this guide
    How To Convert Between IDoc XML and Flat Files in XI.30
    Probably you need to automate this using some programs,
    - Create an ALE port of type File
    using transaction WE21 on your
    Integration Engine.
    - Run report RSEINB00 on your
    Integration Engine. The report will
    upload the file, filter the IDoc header
    data, perform the conversion to IDoc
    XML and put the data into the
    pipeline of the Integration Server.
    Therefore it is crucial, that the IDoc
    control record data is populated
    correctly and corresponds to the
    adapter-specific identifiers of your
    sender service. Once the message
    is put successfully into the pipeline
    of the Integration Server, the file is
    deleted.
    Hope this fixes your issue
    regards
    ravish
    <b>plz dont forget to reward points if helpful</b>

  • KM ABAP : How to publish document in ECC 6.0 with an abap program

    Hello,
    There is something (MF, Class) to publish a document in KM with an abap program in ECC 6.0 ?
    Regards,
    Aurélien

    The balances in both tables should be the same, right?  It is just that in FAGLFLEXA you may have some extra line items due to document splitting.

  • Is a save step neccessary in a Process Chain when loading hierarchies with an ABAP program?

    We are loading hierarchies using the ABAP routine found here in the SDN. 
    We have come accross the issue where the process chain loads successfully, but does not update the hierarchy (this problem is documented in the SDN).  It is not a consistent issue, but it causes problems when it does occur.
    OSS note 652856 points out that a SAVE HIERARCHY step is needed after the load and before the Change Attribute run.
    We have added the step to the process chain, which leads me to the question.
         In using the ABAP program to load hierarchies is the addition of the Save Hierarchy step necessary?
         Will that resolve the issue with hierarchies not updating?

    Hi Bill,
    Yes, SAVE HIERARCHY step is required when hierarchies are loaded as part of process chain. This step ensures that the hierarchy data loaded to BW has been saved. Then we have to run ACR so that these hierarchies will be activated and adjusted.
    This is the reason why even the hierarchy data loaded using infopackage needs this step. This step is not required if the Infopackage is triggered manually.
    This link will help you in better understanding
    http://help.sap.com/saphelp_nw04/helpdata/en/3d/320e3d89195c59e10000000a114084/content.htm
    Regards
    Chandu

  • OBIEE 11g  Map View - Issue with Label Translation

    Hi All,
    I have a strange translation issue with the Maps in 11g.
    Created in English language to plot the Revenue for each of the Postal Codes.
    I selected Postal Code and Revenue Amount in the Criteria and created a new Map View. It had the text 'Postal Code' in the Map Legend and then the scale for revenue amount.
    Now I logged on with Chinese Language , it still appears as 'Postal Code' in English where in it was actually supposed to show it in Chinese.
    We have a translation pack to get all the column names translated. If I try creating a new table view, it shows the translated text instead of 'Postal Code', but some how this doesn't work with Maps.
    Has anyone faced similar issues ? Is there a workaround for this ?
    Thanks for any pointers.

    Hi,
    I also encounter the same issue. When I view combined layout, I get the No Results message. But when I edit the table layout, I see that there are records returned. Does anyone had any luck in resolving this issue?
    Thanks!

  • Issue with XML bursting program

    Hi All,
    We have a Oracle concurrent program which generates PDF output using XML data and RTF template. This output is sent as attachment to a designated user using XML bursting.
    The issue that we are facing is, the mail is sent to the recipients correctly when the program is run from my login. But when the same is run from anyone else’s login, the bursting program fails.
    Suppose the receiver’s email id is [email protected], the error faced is
    [oracle.apps.xdo.batch.DeliveryHelper][EXCEPTION] javax.mail.internet.AddressException: Illegal character in domain in string ``[email protected]@xyz.com''
    On examining the XML bursting program log file for successful and error runs, I could see the below property in the log file-
    For successful run: [SMTP_TO_RECIPIENTS:String] [[email protected]]
    Whereas for unsuccessful run: [SMTP_TO_RECIPIENTS:String] [[email protected]@xyz.com]
    Any pointers in this regard are highly appreciated.
    Regards,
    Kiranmayi.

    Thanks for your quick response.
    I believe the HP printer is an old one and I did have a couple of issues with it while using XML Publisher.However we've overcome those issues.
    We have installed xpdf and have been using the pdf2ps utility.We have PASTA set up and printing works fine when Bursting is not used.
    Is there some change I have to make to the configuration file/Bursting Control file to be able to use this pdf2ps utility to print to this Printer?
    Nevertheless I will also try using ipp on one of our newer printers...
    Thanks,
    Lavina

  • Bizarre RDP Issue with opening remote program with Visual ERP

    So I have two VM's one running SQL server with an ERP program called Visual that has several components and an RDP server that end users log into. We are running windows 2012R2 on both. Everyday around 5:30 the VMFG program for visual stops working until I reboot the RDP server, people already in are fine but anyone trying to open it get the below error. It basically says it can't open the file on the SQL server anymore, yet if I can open the UNC path from the RDP and click on the executable(still crashes with same error), it runs fine locally on the SQL server and other parts of Visual Kios/Time and attendance work fine. I tried removing the anti-virus, checking backups, checking for scheduled tasks, checking event viewer logs, performance monitor, etc and can't seem to figure out this oddity. Any ideas would be greatly appreciated....
    This topic first appeared in the Spiceworks Community

    Hi,
    As this happens with him specific from MRD MAC check whether he is taking RDP with IP address or hostname. Also try to uncheck the Option "Bypass RD Gateway for local address" under RDSH configuration and verify the result. 
    Also for more detail he can collect log from MAC side by following path.
    Microsoft Remote Desktop>About Microsoft Remote Desktop>Send log via email
    Hope it helps!
    Thanks.
    Dharmesh Solanki
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • How to execute Infopackage with an ABAP program

    Dear All,
    I would like to execute an infopackage every 6th day of the month.
    Therefore I would like to integrate a program in a process chain executed on a daily basis, and call with this program the execution of the infopackage if day = 6.
    Do you know how to execute an infopackage inside an ABAP program ? Which function module use ?
    Thanks,
    Greg

    Hello luminy13,
    Just to answer your question on how to start an InfoPackage inside an ABAP program: you can use function module BAPI_IPAK_START. You might also need to use FM BAPI_IPAK_CHANGE to change the scheduling.
    However, if the only reason you are creating the ABAP program is to run the InfoPackage at the 6th day of the month, then I don't recommend that you create the ABAP program at all. You can simply schedule the InfoPackage (or the process chain that contains it) on the 6th day of the month. Here's how to do it:
    In the scheduling dialog, click the ">>" button. Enter the factory calendar, put 6 is in the workday and then choose "beginning of the month".
    Hope this helps.

  • Issue with new abap webdynpro INBOX EHP5

    Hello Experts,
    I'm currently working on the configuration of ESS/MSS services in EHP5. We are using different services like Appraisal OSA, Learning solution,etc. I already configured the Launchpad ESS, it's working fine but now I have an issue with the new Abap webdynpro INBOX. The employee and manager see their workitem notifications correctly in their respective inbox.(I'm calling application: IBO_WDA_INBOX that I integrated in my launchpad).
    My problem is that when clicking on a workitem in order that it opens me the appraisal document (in edit or display mode), I got an error saying: "There is no iView available for system "": object "SWF_WIOBN". For more information, contact your administrator."
    I did some search on SAP help without any results. I'm wondering how should I register workflow tasks? I saw there is a table called IBO_C_WF_TAS (I added entries e.g:
    IBO_WDA_INBOX TS99700031   EXECUTEAPPRAISALDOCUMENT).
    I tried also to register all my custom tasks in transaction SWFVISU.
    example:
    TASK: TS99700013
    Visualization Type: ABAP Webdynpro
    APPLICATION:    HAP_MAIN_DOCUMENT
    DYNPARAM   :    sap-wd-configId=HAP_AC_MAIN_DOC
    NAMESPACE :    sap
    SYSTEM_ALIAS: SAP_Webdynpro_XSS (I did create a system in sap portal under System Administration with as AS property /webdynpro/dispatcher )
    Could you let me know what could be wrong, what I missed? Shall I create an iView, if yes which one? which properties?
    I would really appreciate any help.
    Thanks!

    Hello Siddharth,
    Thanks for you reply. Still the same issue. Following are the config I did till now:
    In the PCD I created a new business object (SWF_WIOBN), an operation linked to the object (NAVIGATE).
    I did create an iView (powl) in the custom folder, I integrated the operation within iView. I created a page that contains the iView.
    In the properties of the iView I gave:
    Application Name: HAP_MAIN_DOCUMENT.
    Launch in New Window: "Display in separate Headerless Portal Window".
    System: SAP_ECC_HumanResources
    I added the required entries in tables:
    IBO_C_WF_TTAS
    IBO_C_WF_ACS
    IBO_V_WF_TAC
    IBO_V_WF_TTAC
    etc...
    I saw in the code of linked feeder class: CL_IBO_INBOX_FEEDER_WI  that it's checking something called "Launch_Editor".. Is it a property that we can set somewhere?
    Following are the parameters retrieved by system:
    BO_NAME       =  SWF_WIOBN
    BO_OP_NAME = NAVIGATE
    LAUNCHER_PARAMETERS ->  empty.??
    BO_RESOLVE_MODE = USER_SET_OF_ROLES
    LAUNCH_EDITOR  empty where must be set?
    At the end I still get the error:
    There is no iView available for system "": object "SWF_WIOBN". For more information, contact your administrator.
    Any advice,
    Thanks in advance

  • 10.1.2.3.0 CP2 Viewer Issue with Managed Links

    With this patch workbooks with managed links that were operational passing a blank (optional) parameter now pass 'NULL' as the value. This is bug 7422080. We are in the process of downloading CP5, which is suppose to resolve this issue. This will take time. Can anyone think of a possible workaround? The workaround explained in the bug does not work, which was to edit the parameter, add a default value, then edit it again, remove the default value and save the workbook. I have also tried ' ' as a default value but it just passes ' '. It would be nice to have a workaround until we can install, test and upgrade to CP5.
    Thanks,
    Jerre

    Michael,
    Below is the file change. When we set it to 'true' Viewer performed correctly.
    Jerre
    =====
    2. Then a new configuration parameter "passNullParameterAsNull" needs to be set in configuration.xml under <viewer section with default value as false and which is an optional one. Usage :
    <viewer queryRefreshPeriod="3000" queryRequestTimeout="1000" longRequestRefreshPeriod="6000" longRequestTimeout="10000" userDefinedConnections="true" passNullParameterAsNull="true" logLevel="debug" laf="dc_blaf" pageNavigation="true" switchWorksheetBehavior="prompt" defaultLocale="en" disableBrowserCaching="false" enableAppsSSOConnection="false">
    When passNullParameterAsNull="false" , that means, when null is passed as parameter from one sheet to another during drill to link, the value will be converted in between to the value which is set as "ShowNullValueAs" in second sheet. eg: if ShowNullValueAs = "" in second sheet. Null value passed from first sheet will reach as value "" in second sheet. If passNullParameterAsNull="true", then Null value will always be passed as Null to second sheet irrespective of the value of "ShowNullValueAs" in second sheet.
    =====

  • F4 help issue with Webdynpro ABAP application

    Hi,
    I am facing a strange issue with the F4 help in my webdynpro abap application.
    I have few fields for Purchase Order and Line item on the screen and they have corresponding F4 helps associated with them.
    When i select for F4 help, sometimes the screen simply blanks out and a white screen is displayed. When i refresh the screen and try the same scenario again, i can see the value list correctly.
    This issue occurs very randomly with no specific pattern. If anyone else has faced this issue earlier, kindly let me know how to get rid of this issue.
    Any pointers to resolve this issue will be helpful.
    Note: I am using SAP version 702 SP09.
    Thanks,
    Ramanath

    Hi,
    we cannot help you from offline, you need to check the standard procedures like
    SICF->is your application node is active.
    FQDN->check fully qualified name is configured
    You can also try to execute standard SAP application, if sap application also has problem running then you may have to get the help of BASiS people to look into that and raise a support ticket.
    If sap applications are running and your custom developed applications are not running then look into this application if there is any URL parameters need to supply etc.

  • Viewing issues with Adobe Acrobat Professional 8

    We have Adobe Acrobat Professional 8 installed, and we are having some issues when viewing pdf documents.  Once a Word document is converted to a pdf document, some of the hyperlinks are appearing thicker (almost bold) than others, and some of the text appears lighter/darker than the rest of the text.  There is no pattern to this, it is all very random.
    When we print the pdf document, everything looks correct, so this only happening when we view the document on the computer.
    Can anyone provide a suggestion on how to fix this issue?
    Thanks!

    Sorry, I forgot the attachment!
    Hi Bill,
    I am attaching screen shots of 1) a page where the hyperlinks appear thicker and 2) the document properties pages showing the fonts.
    We have tried creating it with both the Adobe PDF Maker and the MS PDF tool and it happens using both.  I am thinking that this really is a viewing issue, because it prints out fine.  Also, it looks the same no matter what the zoom setting is.
    Please let me know if you have any other advice.
    Thank you!
    Cari

  • Issue with Creative Cloud program itself - Won't launch

    Hi,
    I'm having an issue with CC.
    The app is launched and it opens. I enter the email address and password. It thinks for a while and then disappears from the screen.
    The icon is there in the systray and as soon as you click on it, the applications appears again but is blank and there is a small window on top of the main with the CC logo on it but that's all.
    End task is the option to close it.
    I searched the KM and saw a reference on deleting the OOBE folder in the Users area but all this did was to force it to ask again for login details and then did the same thing.
    I've had this issue previously and I think I uninstalled the CC app and reinstalled it. This forced ALL the installed adobe programs to be redownloaded and installed again, which I'm hoping to avoid that and having to sort out all the plugins again.
    Win 8.1
    i7 quad core
    32GB ram
    Could I please get some advice so I can get my daughter in action again?
    Thanks
    Screenshot attached.

    HollyTAust removing and reinstalling the Creative Cloud Desktop application should not cause you to need to reinstall you already installed Creative Cloud Desktop application.
    If reinstalling resolved your difficulties previously then please try removing and reinstalling the Creative Cloud Desktop application.  If you then face difficulties with your Adobe applications not being listed properly please see CC desktop lists applications as "Up to Date" when not installed - http://helpx.adobe.com/creative-cloud/kb/aam-lists-removed-apps-date.html.

  • PDF document inline view  Issue with Chrome

    I am facing an issue with the below procedure which should fetch and display PDF document in the browser.
    It displays properly on IE 9. But no luck in Chrome. Shows junk.
    What am I missing? Meanwhile report BLOB column link inline download is working fine with Chrome. I use this proc to popup a new window and display PDF in it.
    Any help is appreciated.
    declare
    v_mime VARCHAR2 (48);
    v_length NUMBER;
    v_file_name VARCHAR2 (2000);
    lob_loc BLOB;
    BEGIN
    SELECT mime_type, content, file_name, DBMS_LOB.getlength (content)
    INTO v_mime, lob_loc, v_file_name, v_length
    FROM lease_deeds
    WHERE lease_ID = :P56_LEASE_ID;
    OWA_UTIL.mime_header ('application/pdf', FALSE);
    HTP.p ('Content-length: ' || v_length);
    OWA_UTIL.http_header_close;
    WPG_DOCLOAD.download_file (lob_loc);
    END;
    -------------

    Has anybody experienced this issue and found a solution yet?

Maybe you are looking for