Problem to open VISIO in workflow table

Hi All,
I opened the workflow table by getting by going to view -> select table-> workflow as i was not able to open it in drop down list. Once opening the workflow when I am trying to open the Visio document in workflow field, i cannot open I got the error
"There is no path information for workflow.vsl in registry"
Then I configured the Advanced and Security Tabs of VISIO. The configuration done Advanced tab is Set both Add-Ons and Start-Up to the folder where the MDM VSL is installed in Security Tab *Enabled the Automation Events Check box * and restarted the VISIO to get changes effected.
But still I am not able to open the Visio and get the following error.
*The add-on listed below could not be loaded because the security level is high, and the add-on has not been digitally signed or verified as safe. To enable the add-on, you can either have the add-on signed or change your security level.
C:\SAP MDM\Workflow\VSL\Workflow.vsl*
Thanks,
MS

Hello MS
Please load you MS Visio and check :
"Tools->Trust center->Macro settings" set to "disable all macros with notifications"
and "Trust acces to VBA project object model" should be empty
Regards
Kanstantsin

Similar Messages

  • Autolaunch in Workflow Table

    Hi there,
    I'm working with the workflow table (MDM SP04 Patch3) and I'm wondering that the Data Manager reference Guide names a property called "autolaunch" within the workflow table properties, but this does not show up at all!?
    So, the order of the properties should be "Trigger Actions" -> "Autolaunch" -> "Max Records" and so on.
    Die anybody get this problem as well?
    Thanks,
    Andreas

    Andreas ,
       I think this should be an issue with the patch level you are on . The latest patch level is SP4 Patch 4 . In this patch to launch the workflow immediately you have to make sure that while making an entry in the workflow table in the record mode , in the data manager , the property "Max time launch" should be set to the value 0 hours. Now if you wish to launch this workflow automatically while activities are performed in Import manager , you will have to include this workflow as follows
    - open the import manager
    - choose configuration > options
    - Choose the checkout/workflow option
    Here you would find your workflow name appearing in the dropdown list . Select the workflow which you wish to execute and save the changes by pressing OK .
    Hope that helps
    Regards
    Deepak Singh

  • Weird problem with mysql query and data table buttons !!!!

    Hi,
    I'm using jsc 2 update 1 on windows and mysql 4.1 . I have a page with a data table. One column of the data table contains "Details" buttons.
    Source query for the table is :
    SELECT tbl_tesserati.idtbl_tesserati idTesserato,
    tbl_tesserati.num_tessera,
    tbl_tesserati.nome,
    tbl_societa.codice_meccanografico
    FROM tbl_tesserati
    INNER JOIN tbl_rel_tesserato_discipline_societa ON tbl_tesserati.idtbl_tesserati = tbl_rel_tesserato_discipline_societa.id_tesserato
    INNER JOIN tbl_cariche ON      tbl_rel_tesserato_discipline_societa.id_carica = tbl_cariche.idtbl_cariche
    INNER JOIN tbl_qualifiche ON      tbl_rel_tesserato_discipline_societa.id_qualifica = tbl_qualifiche.idtbl_qualifiche
    INNER JOIN tbl_discipline ON      tbl_rel_tesserato_discipline_societa.id_disciplina = tbl_discipline.idtbl_discipline
    INNER JOIN tbl_societa ON      tbl_rel_tesserato_discipline_societa.id_societa = tbl_societa.idtbl_societa
    LEFT JOIN tbl_province ON tbl_societa.provincia_sede_sociale = tbl_province.idtbl_province
    LEFT JOIN tbl_comuni ON tbl_societa.comune_sede_sociale = tbl_comuni.idtbl_comuni
    LEFT JOIN tbl_rel_tesserato_discipline_praticate ON tbl_rel_tesserato_discipline_praticate.tessera_id=
    tbl_rel_tesserato_discipline_societa.idtbl_rel_tesserato_discipline
    LEFT JOIN tbl_discipline_praticate ON tbl_discipline_praticate.idtbl_disciplina_praticate=tbl_rel_tesserato_discipline_praticate.disciplina_praticata_id
    WHERE
    tbl_tesserati.cognome LIKE ?
    AND tbl_tesserati.nome LIKE ?
    AND tbl_rel_tesserato_discipline_societa.id_societa LIKE ?
    AND tbl_tesserati.idtbl_tesserati LIKE ?
    AND tbl_cariche.idtbl_cariche LIKE ?
    AND tbl_qualifiche.idtbl_qualifiche LIKE ?
    AND tbl_tesserati.data_nascita >= ?
    AND tbl_tesserati.data_nascita<= ?
    AND tbl_discipline.idtbl_discipline LIKE ?
    AND codice_affiliazione LIKE ?
    AND tbl_societa.denominazione LIKE ?
    AND YEAR(tbl_rel_tesserato_discipline_societa.data_scadenza) LIKE ?
    AND (tbl_province.nome LIKE ? OR tbl_province.nome IS NULL)
    AND ( tbl_comuni.nome LIKE ? OR tbl_comuni.nome IS NULL)
    The tbl_tesserati.data_nascita is a mysql date field.
    The click event handler code for the "Details" Button is:
    public String btnModificaTesserato_action() {
            try{
                TableRowDataProvider rowData= (TableRowDataProvider)getBean("currentRowTesserati");
                getRequestBean1().setId_tesserato((Long)rowData.getValue("idTesserato"));          
            } catch(Exception ex) {
                log("errore nella query",ex);
            return "dettaglioTesseratoSocieta";
        }When i run the project and open the page the table is correctly rendered and populated with some rows. But when i click on details button nothing happens, the page is simply reloaded.
    If i set a breakpoint in the code line   TableRowDataProvider rowData= (TableRowDataProvider)getBean("currentRowTesserati");the debbuger does not stop the code execution ! As if the button was never clicked!
    I tried to modify the source query to :
    SELECT tbl_tesserati.idtbl_tesserati idTesserato,
    tbl_tesserati.num_tessera,
    tbl_tesserati.nome,
    tbl_societa.codice_meccanografico
    FROM tbl_tesserati
    INNER JOIN tbl_rel_tesserato_discipline_societa ON tbl_tesserati.idtbl_tesserati = tbl_rel_tesserato_discipline_societa.id_tesserato
    INNER JOIN tbl_cariche ON      tbl_rel_tesserato_discipline_societa.id_carica = tbl_cariche.idtbl_cariche
    INNER JOIN tbl_qualifiche ON      tbl_rel_tesserato_discipline_societa.id_qualifica = tbl_qualifiche.idtbl_qualifiche
    INNER JOIN tbl_discipline ON      tbl_rel_tesserato_discipline_societa.id_disciplina = tbl_discipline.idtbl_discipline
    INNER JOIN tbl_societa ON      tbl_rel_tesserato_discipline_societa.id_societa = tbl_societa.idtbl_societa
    LEFT JOIN tbl_province ON tbl_societa.provincia_sede_sociale = tbl_province.idtbl_province
    LEFT JOIN tbl_comuni ON tbl_societa.comune_sede_sociale = tbl_comuni.idtbl_comuni
    LEFT JOIN tbl_rel_tesserato_discipline_praticate ON tbl_rel_tesserato_discipline_praticate.tessera_id=
    tbl_rel_tesserato_discipline_societa.idtbl_rel_tesserato_discipline
    LEFT JOIN tbl_discipline_praticate ON tbl_discipline_praticate.idtbl_disciplina_praticate=tbl_rel_tesserato_discipline_praticate.disciplina_praticata_id
    WHERE
    tbl_tesserati.cognome LIKE ?
    AND tbl_tesserati.nome LIKE ?
    AND tbl_rel_tesserato_discipline_societa.id_societa LIKE ?
    AND tbl_tesserati.idtbl_tesserati LIKE ?
    AND tbl_cariche.idtbl_cariche LIKE ?
    AND tbl_qualifiche.idtbl_qualifiche LIKE ?
    AND tbl_tesserati.data_nascita >= ?
    OR tbl_tesserati.data_nascita<= ?
    AND tbl_discipline.idtbl_discipline LIKE ?
    AND codice_affiliazione LIKE ?
    AND tbl_societa.denominazione LIKE ?
    AND YEAR(tbl_rel_tesserato_discipline_societa.data_scadenza) LIKE ?
    AND (tbl_province.nome LIKE ? OR tbl_province.nome IS NULL)
    AND ( tbl_comuni.nome LIKE ? OR tbl_comuni.nome IS NULL)
    Using this query everything works well !! The click handler works and the debugger too !!
    I changed only the AND in OR !!!
    I also tried to change mysql-x-x-connector driver but without solving my problem.
    Can someone help me ?
    Thanks
    Giorgio

    You'll find that it is more to do with the way MySql deals with dates than anything else! Depending on how your date field is setup, then try using a BETWEEN statement for those 2 lines in your first query e.g.
    AND ( tbl_tesserati.data_nascita BETWEEN ? AND ?)
    The date column needs to be in the ISO format to work. If you examine your second query output, you might discover that the output is only going to refer to one parameter (probably the OR one). Did you manage to view the output logs from the application server? You would have got an idea from there with a message like stating a conversion error'.
    Alternatively, you could try using the to_days() function and convert it directly to a number which would be a lot easier to deal with. For example:
    AND to_days(tbl_tesserati.data_nascita >= ? )
    AND to_days( tbl_tesserati.data_nascita<= ? )
    Or try the BETWEEN version with to_days() and see what you get.
    More info about date formatting (v5) here:
    http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_to-days
    Before I forget, sometimes you may need to treat dates as Strings rather 'Long' as you did.
    As a matter of interest, did you try your query in a different piece of software?
    If my queries are a little more complicated, I tend to try MySql queries out in the free MySql query browser and also double check in another to verify certain issues. I found it easier to develop SQL in a seperate program then import the final version to JSC making the required modifications for parameters.
    Message was edited by:
    aerostra

  • Problem in opening Query

    Hi all,
    I need to create a workbook on a query, Am facing problem in opening the query, when i try to open a query in analyzer/ RSRT  it starts processing & continues till 1 hour or more & finally message "Time limit Exceeded" pops up.
    i tried opening a workbook & copy the workbook & tried changing the query in the data provider. but the same problem persists.
    can anyone suggest me an alternate way to create workbook on a specified query.
    Regards
    jasmine.

    Hi arun, 
    It is not due to query performance coz all the performance related measure such as BIA & Aggregates are already taken, i dont even get the variable pop up screen for selecting &
    once when i executed the query in RSRT it gave an ABAP Debugger errror. i check if it was problem with table space, but space is available & its auto extendable.

  • Numbers - problem to open files with iPhone.

    Hello! I have a problem to open a numbers file on Iphone. this file is made with Mac and use the function "SE". I understand tha t the problem is on a table where I use this function. If I delete this part I'm able to open with the Iphone. I try also to cut the expression on 2 different "se" but not work. I'have a dubt about the possibiliy of use the "se" function on the numbers on Iphone.
    Someone have a problem like this? And find a soluction?
    Can you help me?
    Thanks
    Paolo

    Hi, I see your answer but I don't agree for 3 reasons:
    1 -  On numbers on mac the functions with ";" work good;
    2 - I try to put the comma like your suggestion but the system show me an error on the formula with the red triangle
    3 -  I read another time the online help about the instruction and is correct the ";"
    Follow I put a short screen-shot of the instruction help:
    SE
    La funzione SE restituisce uno dei due valori specificati a seconda che il suo risultato sia il valore booleano VERO o FALSO.
    SE(se_espressione; se_vero; se_falso)
    Thanks for your help but for the moments i follow to don't solve my problems.
    bye
    Paolo

  • GL Approval Action History from Workflow tables

    Hi All,
    I have prepared the query to retrieve the Journal Approval Action History from Workflow tables. Below is the Query. This is the Form Personalization. In the Journal Screen i have attached the Menu Action History and placed this query for form personalization.
    Now the problem is in GL_JE_BATCHES i have 80 thousand records. In the query which i have written i am getting only 1000 records. How can i achieve all the records.
    SELECT DISTINCT gjb.NAME batch, default_period_name period,
                       wn.recipient_role approver,
                       DECODE (gjb.approval_status_code,
                               'A', 'Approved',
                               'I', 'In Process',
                               'J', 'Rejected',
                               'R', 'Required',
                               'V', 'Validation Failed',
                               'Z', 'N/A'
                              ) status,
                       wn.begin_date approval_start_date,
                       wn.end_date approval_end_date,
                       wn.due_date approval_due_date
                  FROM wf_notifications wn, wf_items wi, gl_je_batches gjb
                 WHERE wn.CONTEXT LIKE
                             'GLBATCH%'
                          || (SELECT item_key
                                FROM wf_items a
                               WHERE a.user_key = wi.user_key
                                 AND a.item_type = 'GLBATCH'
                                 AND ROWNUM = 1)
                          || '%'
                   AND wi.item_type = wn.MESSAGE_TYPE
                   AND wi.user_key = gjb.NAME;
    Can any one please suggest me how to proceed on this issue ASAP?
    Regards,
    Anjan.

    Hi Anjan,
    You can try to set the FND: View Object Max Fetch Size to a value that would allow more data to be returned. However, be aware that this can cause performance issues.
    Cheryl

  • Integration Kit for SAP - Open SQL access to tables. List incomplete.

    After we install the BO integration kit for SAP and CR 2008 we were able to connect to SAP and open SAP Data Dictionnary tables (Open SQL access).
    I have a problem however:
    when I display the list of available tables, the is not showing all the tables in the SAP system. I believe it stops at some point.
    I see all tables with low letters or starting with /BIC...
    I have custom tables with names ranging from ZR1 to ZR5.
    Of these I only see tables up to ZR2*.
    My guess is :
    either that the table list displayed is limited to a certain mumber of tables
    or that there are some authorisations issues to be solved to view all tables (but the same SAP User sees all tables in SE11)
    or there is a table related setting in the Data dictionnary that makes some tables visible by CR and other not
    Thanks in advance for any answer.
    Claudio Ciardelli

    correct - it stops at one point because showing you more than 30.000 tables doesn't really help. Right click on your connection (server entry), select the menu options, there is an entry called Table name like. in your case enter Z% and hit F5 for a refresh and you will only get tables shown starting with Z
    Ingo

  • Problem in triggering the correct workflow on  AdobeForm submission for PCR

    Hi All,
    I am facing a problem involving triggering of workflows through Adobe form submission. I have created a scenario for "Employee seperation" in QISRSCENARIO transaction and assigned it to an approval workflow. I have also activated and assigned the BUS7051-Created event in the workflow Basic Data. My workflow also triggers perfectly when i submit the adobe form. Everything is perfect till here.
    Now i have to create another scenario for "Request for Transfer" Now for this i had to create a seperate workflow. My problem is since both these workflows are assigned to the same event whenever i submit the "Employee seperation" form both the workflows get triggered. <b>Is there a setting where i can configure the corresponding workflow to be triggered for the respective scenario's alone?</b> How do we handle this situation?

    Hi Jocelyn/Raja,
    I am trying to use SWB_COND for differentiating between the different workflows. I have created a virtual attribute W_SCENARIO_KEY for this. I tried populating this scenario key by using the following staement,
    <b>
    CALL FUNCTION 'ISR_SPECIAL_DATA_GET'                       
      EXPORTING                                                
        notification_no                     =  object-key-number
    IMPORTING                                                 
        SCENARIO                            = w_scenario_key.  
      SWC_SET_ELEMENT CONTAINER 'W_SCENARIO_KEY' W_SCENARIO_KEY.</b>
    When i try to include W_SCENARIO_KEY as a start condition the workflow shows up an express message and fails to trigger. In ST22 i can see that there is an exception "INVALID_NOTIF_NUMBER" raised.
    But if i don't set this as a start condition all the workflows activated to BUS7051-CREATED are triggered and in the WF logs i can see the correct value of W_SCENARIO_KEY for the respective notification number.
    I am not sure why this happens when i set it as a start condition alone.
    I instead used a select statement as shown below,
    <b>select * from viqmel into table itab_VIQMEL          
                  where qmnum = object-key-number.       
    loop at itab_viqmel where qmnum = object-key-number. 
    w_scenario_key = itab_viqmel-auswirk.                
    endloop.</b>
    After inserting this statement it works fine without any issues. Any idea on why ISR_SPECIAL_DATA_GET cant be used in the virtual attribute implementation?
    The following is the dump i get if i use ISR_SPECIAL_DATA_GET,
    Information on where terminated                                                                 
        The termination occurred in the ABAP program "SAPLQISR9" in                                 
         "ISR_SPECIAL_DATA_GET".                                                                    
        The main program was "RSWDSTRT ".                                                                               
    The termination occurred in line 39 of the source code of the (Include)                     
         program "LQISR9U01"                                                                        
        of the source code of program "LQISR9U01" (when calling the editor 390).                                                                               
    Source Code Extract                                                                               
    Line  SourceCde                                                                               
    9 *"  EXCEPTIONS                                                                               
    10 *"      NO_INTERNAL_SERVICE_REQUEST                                                       
       11 *"      INVALID_NOTIF_NUMBER                                                              
       12 *"      INT_SERVICE_REQUEST_NOT_FOUND                                                     
       13 *"----
       14                                                                               
    15 * local data                                                                               
    16   DATA: lt_dummy TYPE qisrsgeneral_param.                                                 
       17                                                                               
    18   DATA: lr_isr_document TYPE REF TO cl_isr_xml_document.                                  
       19                                                                               
    20   DATA: ls_notif TYPE qmel.                                                               
       21                                                                               
    22 * MAIN                                                                               
    23 * try buffer first                                                                      
       24   CALL FUNCTION 'ISR_SPECIAL_DATA_BUFFER_GET'                                           
       25     IMPORTING                                                                               
    26       ET_SPECIAL_DATA       = special_data                                              
       27       ED_SCENARIO           = scenario                                                  
       28     EXCEPTIONS                                                                          
       29       BUFFER_EMPTY          = 1.                                                        
       30                                                                               
    31   IF sy-subrc eq 0.                                                                     
       32     EXIT.                                                                               
    33   ENDIF.                                                                               
    34                                                                               
    <b>   35 * check notification number                                                             
       36   SELECT SINGLE * FROM qmel INTO  ls_notif                                              
       37                             WHERE qmnum = notification_no.                              
       38   IF sy-subrc NE 0.                                                                     
    >>>>>     RAISE invalid_notif_number.                                                         
       40   ELSEIF ls_notif-auswirk IS INITIAL.                                                   
       41     RAISE no_internal_service_request.                                                  
       42   ENDIF.     </b>                                                                               
    43                                                                               
    44 * set scenario                                                                          
       45   scenario = ls_notif-auswirk.                                                          
       46                                                                               
    47 * read ISR XML document                                                                 
       48   CALL METHOD cl_isr_xml_document=>read_for_display                                     
       49     EXPORTING  id_notif_no         = notification_no                                    
       50     IMPORTING  er_isr_xml_document = lr_isr_document                                    
       51     EXCEPTIONS bds_error = 1.                                                           
       52                                                                               
    53   IF sy-subrc NE 0.                                                                     
    54     RAISE int_service_request_not_found.           
    55   ENDIF.                                           
    56                                                    
    57 * read data from XML document                      
    58   CALL METHOD lr_isr_document->get_data_from_xml

  • Problem in Open dataset in background

    Hi All,
    Iam facing the problem in Open dataset in background. It is working fine in foreground.
    Iam able to read only one line from the application server file in background.
    Please find below the code.
      IF sy-batch = wl_x.
        OPEN DATASET pa_sfile FOR INPUT IN TEXT MODE encoding default. "    
       IF sy-subrc = 0.
          DO.
            READ DATASET pa_sfile INTO wf_string.
            IF sy-subrc <> 0.
              EXIT.
            ELSE.
              SPLIT wf_string AT cl_abap_char_utilities=>horizontal_tab INTO wa_upload-
                       field1 wa_upload-field2 wa_upload-field3
              wa_upload-field4 wa_upload-field5 wa_upload-field6 wa_upload-field7
             wa_upload-field8   wa_upload-field9 wa_upload-field10 wa_upload-field11 wa_upload-field12 wa_upload-field13 wa_upload-field14 wa_upload-field15 wa_upload-field16 wa_upload-field17 wa_upload-field18  wa_upload-field19 wa_upload-field20 wa_upload-field21 wa_upload-field22 wa_upload-field23
              wa_upload-field24 wa_upload-field25 wa_upload-field26 wa_upload-field27 wa_upload-field28  wa_upload-field29 wa_upload-field30 wa_upload-field31 wa_upload-field32 wa_upload-field33  wa_upload-field34 wa_upload-field35 wa_upload-field36 .
              APPEND wa_upload TO int_upload.
              CLEAR wa_upload.
            ENDIF.
          ENDDO.
          CLOSE DATASET pa_sfile.
    Thanks in advance.
    Quick suggestions are highly appreciated.
    Best Regards,
    Brahma Reddy

    Thanks for the reply.
    Here is the whole code.
    Here iam submitting one job to the backgrond. But if iam executing it in debugging mode by changing the values of sy-batch( without submitting to background ) at run time, my program is working fine.
    REPORT zvtraffic_carrier_upload
           NO STANDARD PAGE HEADING LINE-SIZE 255
                  MESSAGE-ID zmmx.
    *Data Declarations                                                     *
    TABLES: vtrkh,
            vekp,
            zvship_non_pkgs.
    declaration of data
    DATA:
       wf_filename         LIKE ibipparms-path,  "file with path
       wf_file             LIKE ibipparms-path,        "file
       wf_extsn(3)         TYPE c ,              "file extension
       wf_recnt            TYPE i,
       wf_recok            TYPE i,
    *+001 Begin
       wf_string           TYPE string,
       wf_mess             TYPE string,
       wf_field1       TYPE string,
       wf_field2(30)       TYPE c,
       wf_sum_source_file  TYPE rlgrap-filename ,
       wf_sum_dest_file    TYPE rlgrap-filename ,
      wf_path         LIKE   rlgrap-filename,
       wf_path TYPE salfile-longname
                        VALUE '/usr/sap/nfs/erp/UTL/',
    *+001 End
       wf_complete_file    LIKE pcfile-path.     "total file path
    declaration of counters
    DATA:
       wc_rec(6)          TYPE c,                "total record counter
       wc_success_rec(6)  TYPE c,                "no of rec.having no errors
       wc_error_rec(6)    TYPE c,                "no of rec. having errors
       wc_rec_tot(6)      TYPE c.                "total records
    Constants declarations
    CONSTANTS:
       wl_x(1)         TYPE c VALUE 'X',          "X
       wl_1            TYPE i           VALUE '1',         "Integer value
       wl_e(1)         TYPE c           VALUE 'E',         "Char    value
       wl_mode         TYPE c           VALUE 'N',
       wl_update       TYPE c           VALUE 'S',
       wl_trackno(13)  TYPE c           VALUE 'Tracking No. ',
       wl_tcode(14)    TYPE c           VALUE 'ZVTRAFFICINPUT',
    *+001 Begin:
       wl_id(11)       TYPE c           VALUE 'CARRIERFILE',
       wl_adm(100)     TYPE c           VALUE '[email protected]',
       wl_u(1)         TYPE c VALUE 'U',       " Email through Internet
       wl_int(3)       TYPE c VALUE 'INT',     " Communication method
       wl_urgent(6)    TYPE c VALUE 'Urgent',
       wl_raw(3)       TYPE c VALUE 'RAW',
       wl_descr(48)    TYPE c VALUE 'SAP Alert: Carrier upload',
       wl_file(128)    TYPE c VALUE '/usr/sap/nfs/erp/UTL/carrier.xls',
       wl_jobname LIKE tbtcjob-jobname VALUE 'ZVTRAFFIC_UP',
       wl_variant LIKE raldb-variant VALUE 'VMM01_ZVTRFFIC',
       wl_action  TYPE  zaction VALUE 'MOV', "For moving file to other dir
       wl_i       TYPE  c VALUE 'I',
       wl_cmd(50) TYPE c VALUE '/usr/sap/nfs/erp/UTL/',
       wl_57           TYPE i      VALUE 57,
       wl_m1(2)         TYPE c VALUE 'M1',                      "value M1
       wl_m2(2)         TYPE c VALUE 'M2',                      "value M1
    *+001 End:
       wl_xls(3)       TYPE c           VALUE 'xls',       "Char value
       wl_value(1)     TYPE c           VALUE ','.         "Char value
    *Internal Tables Declarations                                          *
    internal table for holding data from excel file
    *+001 begin
    TYPES : BEGIN OF ty_dir,
             dir(132)  TYPE  c,
            END   OF ty_dir.
    *internal table to get the files in the direactory
    DATA : int_dir      TYPE ty_dir OCCURS 0 WITH HEADER LINE .
    *work area for int_dir
    DATA : wa_int_dir      LIKE LINE OF int_dir.
    DATA: ifiles TYPE TABLE OF  salfldir WITH HEADER LINE.
    *+001 end
    TYPES: BEGIN OF int_upload,
             field1(30)   TYPE c,       "
             field2(30)   TYPE c,       "
             field3(30)   TYPE c,       "
             field4(30)   TYPE c,       "
             field5(30)   TYPE c,       "
             field6(30)   TYPE c,       "
             field7(30)   TYPE c,       "
             field8(30)   TYPE c,       "
             field9(30)   TYPE c,       "
             field10(30)  TYPE c,       "
             field11(30)  TYPE c,       "
             field12(30)  TYPE c,       "
             field13(30)  TYPE c,       "
             field14(30)  TYPE c,       "
             field15(30)  TYPE c,       "
             field16(30)  TYPE c,       "
             field17(30)  TYPE c,       "
             field18(30)  TYPE c,       "
             field19(30)  TYPE c,       "
             field20(30)  TYPE c,       "
             field21(30)  TYPE c,       "
             field22(30)  TYPE c,       "
             field23(30)  TYPE c,       "
             field24(30)  TYPE c,       "
             field25(30)  TYPE c,       "
             field26(30)  TYPE c,       "
             field27(30)  TYPE c,       "
             field28(30)  TYPE c,       "
             field29(30)  TYPE c,       "
             field30(30)  TYPE c,       "
             field31(30)  TYPE c,       "
             field32(30)  TYPE c,       "
             field33(30)  TYPE c,       "
             field34(30)  TYPE c,       "
             field35(30)  TYPE c,       "
             field36(30)  TYPE c,       "
            END OF int_upload.
    DATA: int_upload   TYPE STANDARD TABLE OF int_upload.
    declaring bdc table
    DATA: int_bdcdata LIKE STANDARD TABLE OF bdcdata
          INITIAL SIZE 0 WITH HEADER LINE.
    DATA:   wa_bdcdata LIKE bdcdata.
    DATA:int_messages TYPE
         STANDARD TABLE OF bdcmsgcoll INITIAL SIZE 0.
    TYPES: BEGIN OF ty_error_data,
           errtext(500) TYPE c,
           END OF ty_error_data.
    DATA: wa_messages LIKE LINE OF
          int_messages.
    DATA: wa_error_data TYPE
          ty_error_data .
    DATA: int_error_data TYPE
          STANDARD TABLE OF ty_error_data INITIAL SIZE 0.
    *Work Area declarations
    Work area
    DATA:
    wa_upload    LIKE LINE OF int_upload.      "work area for int_upload
    Selection Screen
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS : pa_foreg RADIOBUTTON GROUP g1 USER-COMMAND rad DEFAULT 'X', " user command rad,
                 pa_backg RADIOBUTTON GROUP g1 .
    SELECTION-SCREEN: SKIP.
    Input File Location Specification
    SELECTION-SCREEN BEGIN OF BLOCK b11 WITH FRAME TITLE text-002.
    PARAMETERS pa_file LIKE rlgrap-filename
               MODIF ID m1. "OBLIGATORY.     "Input File -001
    SELECTION-SCREEN END OF BLOCK b11.
    *+001 Begin
    SELECTION-SCREEN BEGIN OF BLOCK b12 WITH FRAME TITLE text-006.
    PARAMETERS pa_sfile LIKE rlgrap-filename DEFAULT '/usr/sap/nfs/erp/UTL/carrier2'
               LOWER CASE MODIF ID m2. " server filename
    *PARAMETERS pa_batch AS CHECKBOX DEFAULT ' ' MODIF ID m2.    "Background job
    *+001 End
    SELECTION-SCREEN END OF BLOCK b12.
    SELECTION-SCREEN END OF BLOCK b1.
    Event: INITIALIZATION
    INITIALIZATION.
    clear variables
    refresh internal tables
      REFRESH:int_upload.
    clear Work areas
      CLEAR:  wa_upload.
    A T  S E L E C T I O N - S C R E E N
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_file.           "-001
    subroutine to display the batch data input file location
      PERFORM f_get_filename.
    *+001 Begin:
    AT SELECTION-SCREEN OUTPUT.
      IF pa_backg = wl_x.
        LOOP AT SCREEN.
          IF screen-group1 = wl_m2.
            screen-invisible = space.
            screen-active = '1'.
            MODIFY SCREEN.
          ELSE.
            IF screen-group1 = wl_m1.
              screen-input = '0'.
              MODIFY SCREEN.
            ENDIF.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          IF screen-group1 = wl_m2.
            screen-input = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_sfile.
    subroutine to display list of files in application server
      PERFORM f_get_server_file.
    *+001 End:
    At Selection-Screen Event: validations check                        *
    AT SELECTION-SCREEN .
    validates the Selection Screen input
      PERFORM f_check_input.
    Event TOP-OF-PAGE
    TOP-OF-PAGE.
    Event: START-OF-SELECTION
    START-OF-SELECTION.
    *+001 Begin :
    get the path for all files from the directory
    PERFORM f_get_path.
    set up background job
      PERFORM f_background_job.
    *+001 End:
    *-001
      CHECK pa_backg EQ ' '.
    *-001
    LOOP AT ifiles.
    clear itab. refresh itab.
       CONCATENATE wf_path ifiles-name INTO pa_sfile.
    upload PC file to internal table int_UPLOAD
      PERFORM f_upload_excel_file.
    reformat data
      PERFORM f_format_data.
    upload formatted data into SAP system
      break breddy.
      PERFORM f_upload_data.
    Event: END-OF-SELECTION
    *END-OF-SELECTION.
    display summary report
      PERFORM f_display_report.
    *+001 Begin
      IF sy-batch = wl_x.
      CONCATENATE '/usr/sap/trans/carrier2' '_'
                  sy-datum '_' sy-uzeit
                  INTO wf_sum_dest_file.
        wf_sum_source_file = '/usr/sap/nfs/erp/UTL/carrier2'.
       wf_sum_dest_file = '/usr/sap/trans/carrier2'.
    ELSE.
       wf_sum_source_file = pa_file.
       wf_sum_dest_file = '/usr/sap/trans/carrier2'.
    To move the processed file to Completed directory
      PERFORM f_move_file_to_other_dir USING
                   wf_sum_source_file
                   wf_sum_dest_file.
      ENDIF.
    *+001 End
      wait up to 60 seconds.
    *&      Form  f_get_filename
          Display the File Location
          Called by:  Main Program (AT SELECTION-SCREEN on VALUE-REQUEST)
          Calls:
    FORM f_get_filename.
      CLEAR wf_filename.
      CALL FUNCTION 'F4_FILENAME'
           EXPORTING
                program_name  = syst-cprog
                dynpro_number = syst-dynnr
               field_name    = wf_fieldname
           IMPORTING
                file_name     = wf_filename.
    If the user press cancel button without selecting file name
    then the file name will be initial and raise the error message
      IF wf_filename IS INITIAL.
        MESSAGE i000 WITH 'No File selected'(012).
        LEAVE LIST-PROCESSING.
      ENDIF.
      pa_file = wf_filename.
    ENDFORM.                    " f_get_filename
    Form: F_CHECK_INPUT                                                **
    Description:
    This subroutine is used to validate the Selection Screen inputs.
    Called By:  ZMISOPPLAN01                                            *
    Calls:      None                                                    *
    FORM f_check_input.
      if pa_foreg eq wl_X.
        if sy-batch ne wl_X.  " IF pa_foreg EQ wl_x.                                      " +001
    check file type
        IF pa_file NS '.xls'.
          MESSAGE e106.
        ENDIF.
      ENDIF.              "+001
      endif.
    *+001 Begin:
    wf_file = pa_sfile.
    EXPORT wf_file TO MEMORY ID wl_id.
    ENDIF.  " Commented by Br
    *+001 Begin
      IF pa_backg EQ wl_x.
        pa_sfile = '/usr/sap/nfs/erp/UTL/carrier2'.
        OPEN DATASET pa_sfile FOR INPUT IN TEXT MODE ENCODING  DEFAULT MESSAGE wf_mess.
        IF sy-subrc NE 0.
          MESSAGE e000(zmmx) WITH 'File not present in path /usr/sap/nfs/erp/UTL'.
          LEAVE LIST-PROCESSING.
          STOP.
        ELSE.
          CLOSE DATASET pa_sfile.
        ENDIF.
    ELSE.
       OPEN DATASET pa_sfile FOR INPUT IN TEXT MODE ENCODING  DEFAULT MESSAGE wf_mess.
       IF sy-subrc NE 0.
         MESSAGE e000(zmmx) WITH 'File not found:' pa_sfile.
         LEAVE LIST-PROCESSING.
         STOP.
       ELSE.
         CLOSE DATASET pa_sfile.
       ENDIF.
      ENDIF.
    *+001 End:
    ENDFORM.                                            "f_check_input
    *&   Form  f_upload_excel_file
       Uploads an excel file from the workstation. The file is loaded  *
       into the internal table specified by int_out_tab.               *
    -->  PA_FILE       The name and path of the excel file to upload  *
    <--  int_UPLOAD    Internal table that that will contain the data *
                        loaded from the excel file.                    *
    FORM f_upload_excel_file.
    *-001
      TYPES truxs_t_text_data(4096) TYPE c OCCURS 0.
      DATA: int_tab_input_data TYPE truxs_t_text_data.
    *+001
      IF sy-batch IS INITIAL.
    *+001
    uploading data into internal table int_upload from excel file
        CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
          EXPORTING
            i_tab_raw_data       = int_tab_input_data[]
            i_filename           = pa_file                      "-001
          TABLES
            i_tab_converted_data = int_upload
          EXCEPTIONS
            conversion_failed    = 1
            OTHERS               = 2.
    problems occur in file uploading
        IF int_upload[] IS INITIAL.
          MESSAGE i000 WITH 'No data uploaded from input file'(005).
          LEAVE LIST-PROCESSING.
        ENDIF.
    *+001
      ENDIF.
    *+001
      IF sy-batch = wl_x.
        OPEN DATASET pa_sfile FOR INPUT IN TEXT MODE encoding default. " ENCODING  DEFAULT MESSAGE wf_mess.
        IF sy-subrc = 0.
          DO.
            READ DATASET pa_sfile INTO wf_string.
            IF sy-subrc <> 0.
              EXIT.
            ELSE.
              SPLIT wf_string AT cl_abap_char_utilities=>horizontal_tab INTO wa_upload-field1 wa_upload-field2 wa_upload-field3
              wa_upload-field4 wa_upload-field5 wa_upload-field6 wa_upload-field7 wa_upload-field8
              wa_upload-field9 wa_upload-field10 wa_upload-field11 wa_upload-field12 wa_upload-field13
              wa_upload-field14 wa_upload-field15 wa_upload-field16 wa_upload-field17 wa_upload-field18
              wa_upload-field19 wa_upload-field20 wa_upload-field21 wa_upload-field22 wa_upload-field23
              wa_upload-field24 wa_upload-field25 wa_upload-field26 wa_upload-field27 wa_upload-field28
              wa_upload-field29 wa_upload-field30 wa_upload-field31 wa_upload-field32 wa_upload-field33
              wa_upload-field34 wa_upload-field35 wa_upload-field36 .
              APPEND wa_upload TO int_upload.
              CLEAR wa_upload.
            ENDIF.
          ENDDO.
          CLOSE DATASET pa_sfile.
        ELSE.
          MESSAGE i000(zmmx) WITH 'File not found'.
          LEAVE LIST-PROCESSING.
          STOP.
        ENDIF.
      ENDIF.
    +001
    ENDFORM.                                  "f_upload_excel_file
    *&      Form  f_format_data
          format the data to be uploaded
          Called by:  ZMISOPPLAN01
          Calls: N/A
    FORM f_format_data.
    delete the header lines
      DELETE int_upload WHERE
      field1 CS 'SCAC' OR field1 CS 'Scac' OR field1 CS 'Carrier'.
    delete lines with no carrier info
      DELETE int_upload WHERE
      field1 IS INITIAL OR field2 IS INITIAL.
      SORT int_upload BY field2.
    ENDFORM.                    " f_format_data
    *&      Form  f_upload_data
          Description:upload the data
    FORM f_upload_data.
      DATA: loc_priceperlb LIKE zvship_trk_data-act_per_lb,
            loc_charprice(10) TYPE n,
            loc_size TYPE i,
            loc_pickupdate(10) TYPE c,
            loc_totalwt    LIKE zvship_trk_data-pkg_wgt.
      CHECK NOT int_upload[] IS INITIAL.
      DESCRIBE TABLE int_upload LINES wf_recnt.
      LOOP AT int_upload INTO wa_upload.
        SELECT COUNT(*) FROM zvship_trk_data WHERE trackn = wa_upload-field2.
        IF sy-subrc = 0.
    tracking no. exists in carrier database
          CONCATENATE wl_trackno wa_upload-field2
          ' already exists in carrier tracking database'  INTO
          wa_error_data-errtext. "Error text of int_error_data
          APPEND wa_error_data TO int_error_data.
        ELSE.
          SELECT SINGLE * FROM vtrkh WHERE trackn = wa_upload-field2.
          IF sy-subrc <> 0.
    tracking no. not in tracking database
            CONCATENATE wl_trackno wa_upload-field2
            ' not found in tracking database'  INTO
            wa_error_data-errtext. "Error text of int_error_data
            APPEND wa_error_data TO int_error_data.
          ELSE.
    must have freight charge
            IF wa_upload-field20 IS INITIAL.
              CONCATENATE wl_trackno wa_upload-field2
              ' has no total net charges'  INTO
              wa_error_data-errtext. "Error text of int_error_data
              APPEND wa_error_data TO int_error_data.
              CONTINUE.
            ENDIF.
    must have final delv. date
            IF wa_upload-field25 IS INITIAL.
              CONCATENATE wl_trackno wa_upload-field2
              ' has no final delivery date'  INTO
              wa_error_data-errtext. "Error text of int_error_data
              APPEND wa_error_data TO int_error_data.
              CONTINUE.
            ENDIF.
    all checks ok, build BDC for ZVTRAFFICINPUT
    get total weight and compute price/lb
            IF vtrkh-uevbtyp EQ wl_x.
              SELECT SINGLE  brgew INTO loc_totalwt
              FROM zvship_non_pkgs
                WHERE venum = vtrkh-vbeln.
            ELSE.
              SELECT SINGLE brgew INTO loc_totalwt
              FROM vekp WHERE venum = vtrkh-vbeln.
            ENDIF.
            IF sy-subrc NE 0.
              CONCATENATE wl_trackno wa_upload-field2
              ' has no total weight'  INTO
              wa_error_data-errtext. "Error text of int_error_data
              APPEND wa_error_data TO int_error_data.
              CONTINUE.
            ENDIF.
    price/lb = total net charges / total wt
            loc_priceperlb = wa_upload-field20 / loc_totalwt.
            WRITE loc_priceperlb TO loc_charprice LEFT-JUSTIFIED.
    if no pickup date from VTRKH, use date from file
            IF vtrkh-routeldat IS INITIAL.
              loc_pickupdate = wa_upload-field23.
            ELSE.
              CALL FUNCTION 'CONVERSION_EXIT_PDATE_OUTPUT'
                EXPORTING
                  input  = vtrkh-routeldat
                IMPORTING
                  output = loc_pickupdate.
            ENDIF.
            PERFORM f_set_bdc_val
            USING :
            '1' 'SAPLZVSHIP_TRAK' '0001',
            ' ' 'BDC_CURSOR' 'VIM_POSITION_INFO',
            ' ' 'BDC_OKCODE' '=AEND'.
            PERFORM f_set_bdc_val
            USING :
            '1' 'SAPLZVSHIP_TRAK' '0001',
            ' ' 'BDC_CURSOR' 'ZVSHIP_TRK_DATA-EOD_DATE(01)',
            ' ' 'BDC_OKCODE' '=NEWL'.
            PERFORM f_set_bdc_val
            USING :
            '1' 'SAPLZVSHIP_TRAK' '0002',
            ' ' 'BDC_CURSOR' 'ZVSHIP_TRK_DATA-TRACKN',
            ' ' 'ZVSHIP_TRK_DATA-TRACKN' wa_upload-field2,
            ' ' 'BDC_OKCODE' '/00'.
            PERFORM f_set_bdc_val
            USING :
            '1' 'SAPLZVSHIP_TRAK' '0002',
            ' ' 'ZVSHIP_TRK_DATA-EOD_DATE' loc_pickupdate,
            ' ' 'ZVSHIP_TRK_DATA-ACT_DATE' wa_upload-field25.
       IF NOT wa_upload-field15 IS INITIAL.
         PERFORM F_SET_BDC_VAL
         USING :
         ' '  'ZVSHIP_TRK_DATA-PKG_WGT' wa_upload-field15.  "Total Wt.
       ENDIF.
            PERFORM f_set_bdc_val
            USING :
            ' ' 'ZVSHIP_TRK_DATA-ACT_FRT' wa_upload-field20,"Total Net charges
            ' ' 'ZVSHIP_TRK_DATA-ACT_SURCH' wa_upload-field18,"Fuel surcharge
            ' ' 'ZVSHIP_TRK_DATA-ACT_ACC' wa_upload-field19,  "Accessorial ch.
            ' ' 'ZVSHIP_TRK_DATA-ACT_TOTAL' wa_upload-field16,"Gross Charges
            ' ' 'ZVSHIP_TRK_DATA-ACT_PER_LB' loc_charprice.  "Price/LB
       IF NOT wa_upload-field13 IS INITIAL.
         PERFORM F_SET_BDC_VAL
         USING :
         ' ' 'ZVSHIP_TRK_DATA-PKG_PAL' wa_upload-field13.  "Pallet count
       ENDIF.
       IF NOT wa_upload-field14 IS INITIAL.
         PERFORM F_SET_BDC_VAL
         USING :
         ' ' 'ZVSHIP_TRK_DATA-PKG_PCS' wa_upload-field14.  "Case count
       ENDIF.
            PERFORM f_set_bdc_val
            USING :
            ' ' 'BDC_OKCODE' '=SAVE'.
            PERFORM f_set_bdc_val
            USING :
            '1' 'SAPLZVSHIP_TRAK' '0002',
            ' ' 'BDC_OKCODE' '=UEBE'.
            PERFORM f_set_bdc_val
            USING :
            '1' 'SAPLZVSHIP_TRAK' '0001',
            ' ' 'BDC_OKCODE' '=BACK'.
    call transaction ZVTRAFFICINPUT
            PERFORM f_call_zvtrafficinput.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " f_upload_data
          FORM F_SET_BDC_VAL                                            *
    -->  WG_DYNBEGIN                                                   *
    -->  WF_FIELDNAME                                                  *
    -->  WF_FIELDVAL                                                   *
    FORM f_set_bdc_val  USING
          locf_dynbegin
          locf_fieldname
          locf_fieldval.
      CLEAR wa_bdcdata.
      IF locf_dynbegin = wl_1.                                  "'1'.
        wa_bdcdata-program = locf_fieldname.
        wa_bdcdata-dynpro = locf_fieldval.
        wa_bdcdata-dynbegin = wl_x. "'X'.
      ELSE.
        wa_bdcdata-fnam = locf_fieldname.
        wa_bdcdata-fval = locf_fieldval.
      ENDIF.
      APPEND wa_bdcdata TO int_bdcdata.
    ENDFORM.                    "F_SET_BDC_VAL
    *&      Form  F_CALL_ZVTRAFFICINPUT
          text
    -->  p1        text
    <--  p2        text
    FORM f_call_zvtrafficinput .
      DATA: locf_last_rec TYPE sy-index,
            wf_msgstring(128)                TYPE c.
      DATA: loc_mode TYPE c.
      loc_mode = 'N'.      "+001 needs to be changed
      CALL TRANSACTION wl_tcode
        USING int_bdcdata
        MODE 'A'
        MODE wl_mode  "In Backgrnd(N)
          MODE loc_mode
        UPDATE wl_update              "(S)ynchr mode "+001
        MESSAGES INTO int_messages.
    In case there are errors in call transaction
      IF sy-subrc <> 0.
        DESCRIBE TABLE int_messages LINES locf_last_rec.
        READ TABLE int_messages INTO wa_messages
              INDEX locf_last_rec.
        PERFORM f_fill_bdc_error USING wa_upload-field2 wf_msgstring.
      ELSE.
    Keep count of successfully process records
        wf_recok = wf_recok + 1.
        PERFORM f_fill_bdc_success USING wa_upload-field2.
      ENDIF.
      REFRESH: int_bdcdata, int_messages.
    ENDFORM.                    " F_CALL_ZVTRAFFICINPUT
    *&      Form  f_fill_bdc_success
          text
         -->P_WA_UPLOAD_FIELD2  text
    FORM f_fill_bdc_success  USING    p_wa_upload_field2.
      CONCATENATE wl_trackno p_wa_upload_field2 '- Entry added'
      INTO
      wa_error_data-errtext. "Success message
      APPEND wa_error_data TO int_error_data.
    ENDFORM.                    " f_fill_bdc_success
    *&      Form  f_fill_bdc_error
          text
         -->P_WA_UPLOAD_FIELD2  text
         -->P_WF_MSGSTRING  text
    FORM f_fill_bdc_error  USING    p_wa_upload_field2
                                    p_wf_msgstring.
      CONCATENATE wl_trackno p_wa_upload_field2
      '- Error : ' p_wf_msgstring
      INTO
      wa_error_data-errtext. "Error text of int_error_data
      APPEND wa_error_data TO int_error_data.
    ENDFORM.                    " f_fill_bdc_error
    *&      Form  f_display_report
          text
    FORM f_display_report.
    *+001 Begin:
      DATA: reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
            doc_chng LIKE sodocchgi1,
            objcont LIKE solisti1 OCCURS 0 WITH HEADER LINE.
      DATA: loc_recnt(4) TYPE c,
            loc_recok(4) TYPE c.
    *+001 End:
        if sy-batch ne wl_x.  "+001
        ULINE /1(175).
        WRITE:/ 'Date/Time: '(006) COLOR COL_HEADING,
                sy-datum DD/MM/YYYY, '/',sy-uzeit,
                40 'Uploading of Carrier Information to ZVTRAFFIC'.
        ULINE /1(175).
        SKIP.
        WRITE:/ 'Following File Has Been Processed'.
             / pa_file.    "-001
        SKIP.
        WRITE:/ 'Number of records read:', wf_recnt.
        WRITE:/ 'Number of records processed successfully:', wf_recok.
        SKIP.
        LOOP AT int_error_data INTO wa_error_data.
          WRITE :/ wa_error_data-errtext.
        ENDLOOP.
    *+001 Begin:
      ELSE.
       IMPORT wf_file FROM MEMORY ID wl_id.
        reclist-receiver = wl_adm.
        reclist-rec_type = wl_u.
        reclist-com_type = wl_int.
        APPEND reclist.
        doc_chng-obj_name = wl_urgent.
        doc_chng-obj_descr = wl_descr.
        CONCATENATE 'Date/Time: ' sy-datum '/' sy-uzeit
                'Uploading of Carrier Information to ZVTRAFFIC'
                INTO objcont SEPARATED BY space.
        APPEND objcont.
    *-001
       CONCATENATE 'Following File Has Been Processed' pa_file
                 INTO objcont SEPARATED BY space.
       APPEND objcont.
    *-001
        loc_recnt = wf_recnt.
        CONCATENATE 'Number of records read:' loc_recnt
          INTO objcont SEPARATED BY space.
        APPEND objcont.
        loc_recok = wf_recok.
        CONCATENATE 'Number of records processed successfully:' loc_recok
          INTO objcont SEPARATED BY space.
        APPEND objcont.
        LOOP AT int_error_data INTO wa_error_data.
          MOVE wa_error_data-errtext TO objcont.
          APPEND objcont.
        ENDLOOP.
        CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
          EXPORTING
            document_type              = wl_raw
            document_data              = doc_chng
            put_in_outbox              = wl_x
            commit_work                = wl_x
          TABLES
            object_content             = objcont
            receivers                  = reclist
          EXCEPTIONS
            too_many_receivers         = 1
            document_not_sent          = 2
            operation_no_authorization = 4
            OTHERS                     = 99.
        IF sy-subrc EQ 0.
          MESSAGE s205. "email sent
        ELSE.
          MESSAGE i206. "email not sent
        ENDIF.
      ENDIF.
    *+001 End:
    ENDFORM.                    " f_display_report
    *&      Form  f_background_job
          text
    -->  p1        text
    <--  p2        text
    FORM f_background_job .
      DATA: loc_jobcount LIKE btch1150-jobcount.
      IF pa_backg = wl_x.
        CALL FUNCTION 'JOB_OPEN'
          EXPORTING
            jobname          = wl_jobname
            jobclass         = 'A'
          IMPORTING
            jobcount         = loc_jobcount
          EXCEPTIONS
            cant_create_job  = 1
            invalid_job_data = 2
            jobname_missing  = 3
            OTHERS           = 4.
        IF sy-subrc <> 0.
          MESSAGE i000(zmmx) WITH 'JOB_OPEN failed.' 'sy-subrc =' sy-subrc.
          LEAVE LIST-PROCESSING.
        ENDIF.
        CALL FUNCTION 'JOB_SUBMIT'
             EXPORTING
               extpgm_param            = pa_file
                  authcknam               = sy-uname
                  jobcount                = loc_jobcount
                  jobname                 = wl_jobname
                  report                  = sy-repid
                  variant                 = wl_variant
             EXCEPTIONS
                  bad_priparams           = 1
                  bad_xpgflags            = 2
                  invalid_jobdata         = 3
                  jobname_missing         = 4
                  job_notex               = 5
                  job_submit_failed       = 6
                  lock_failed             = 7
                  program_missing         = 8
                  prog_abap_and_extpg_set = 9
                  OTHERS                  = 10.
        IF sy-subrc <> 0.
          MESSAGE i000(zmmx) WITH 'JOB_SUMBMIT failed.' 'sy-subrc =' sy-subrc.
          LEAVE LIST-PROCESSING.
        ENDIF.
        CALL FUNCTION 'JOB_CLOSE'
          EXPORTING
            jobcount             = loc_jobcount
            jobname              = wl_jobname
            strtimmed            = 'X'
          EXCEPTIONS
            cant_start_immediate = 1
            invalid_startdate    = 2
            jobname_missing      = 3
            job_close_failed     = 4
            job_nosteps          = 5
            job_notex            = 6
            lock_failed          = 7
            OTHERS               = 8.
        IF sy-subrc <> 0.
          MESSAGE i000(zmmx) WITH 'JOB_CLOSE failed.' 'sy-subrc =' sy-subrc.
          LEAVE LIST-PROCESSING.
        ELSE.
          MESSAGE i000(zmmx) DISPLAY LIKE wl_i WITH 'Background job submitted'.
          LEAVE LIST-PROCESSING.
          wait up to 60 seconds.
          STOP.
        ENDIF.
      ENDIF.
    ENDFORM.                    " f_background_job
    *&      Form  f_get_server_file
          text
    -->  p1        text
    <--  p2        text
    FORM f_get_server_file .
      CLEAR: wf_filename.
    following function module display the list of application file and
    directories in a pop up window
      CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
        IMPORTING
          serverfile       = wf_filename
        EXCEPTIONS
          canceled_by_user = 1
          OTHERS           = 2.
    If the user press cancel button without selecting file name
    then the file name will be initial and raise the error message
      IF wf_filename IS INITIAL.
        MESSAGE i000 WITH 'No File selected'(012).
        LEAVE LIST-PROCESSING.
      ENDIF.
      pa_sfile = wf_filename.
    ENDFORM.                    " f_get_server_file
    *&      Form  f_move_file_to_other_dir
          To move the
    FORM f_move_file_to_other_dir  USING   locf_source_file
                                           locf_dest_file.
      CALL FUNCTION 'Z_FILE_HANDLING_UTILITY'
        EXPORTING
          action                    = wl_action  "VALUE 'mov'
          source_physical_file_name = locf_source_file
          dest_physical_file_name   = locf_dest_file
        EXCEPTIONS
          invalid_action            = 1
          invalid_file_type         = 2
          file_type_missing         = 3
          file_type_not_required    = 4
          source_file_missing       = 5
          source_filename_error     = 6
          destination_not_required  = 7
          destination_missing       = 8
          multiple_file_names       = 9
          file_deletion_error       = 10
          invalid_source_file       = 11
          file_read_error           = 12
          file_write_error          = 13
          file_rename_error         = 14
          file_move_error           = 15
          destination_file_exists   = 16
          OTHERS                    = 17.
      IF sy-subrc <> 0.
        MESSAGE i000(zmmx) WITH 'Error in Moving Process directory to completed Directory'(004).
       LEAVE LIST-PROCESSING.
      ENDIF.
    ENDFORM.                    " f_move_file_to_other_dir
    *&      Form  f_get_path
          text
    -->  p1        text
    <--  p2        text
    FORM f_get_path .
      CALL FUNCTION 'RZL_READ_DIR_LOCAL'
        EXPORTING
          name           = wf_path
        TABLES
          file_tbl       = ifiles
        EXCEPTIONS
          argument_error = 1
          not_found      = 2
          OTHERS         = 3.
      DELETE ifiles WHERE name+0(1) = '.'.
      DELETE ifiles WHERE name+0(1) NE 'w'.
    ENDFORM.                    " f_get_path
    Regards,
    Brahma Reddy

  • Workflows table is not showing up in Data Manager drop down table list

    Hi,
    I am able to see Workflows table in Console but not able to see it Data Manager drop down table list in record mode for selection.
    Even not allowed to create another workflow table.
    Thanks for any tips/clue
    -reo

    Reo,
    You will not be able to create another workflow table. There is only a single workflow table that will hold all the workflows you create through the Data Manager.
    As Vito mentioned, please make sure to load the corresponding MDMWorkflow component on the client machines running the Data Manager that you wish to create and view workflows from.
    Once the workflow component is installed you should see it as a new tab in the Data Manager. You will need Visio to create workflows.
    Thanks,
    Tim

  • [b]workflow table structure[/b]

    Hello, I am trying to migrate my processes to Oracle Workflow 2.6.3.
    Now, they are running in a legacy tool. I am studding the tables structure in order to migrate all the data from the last workflow tool to Oracle WF.
    Does someone have any information about these tables (wf_notifications and wf_items)?
    Now, I am in problems with ACCESS_KEY attribute from wf_notifications table.

    If you have a Metalink account, you can get technical reference information about the WF tables from the eTRM:
    http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=150230.1

  • Problem while opening Bex query on the web

    Hello BW experts,
    I have a problem while opening Bex query from my SAP Favorites.See below.
    When i double click on the query, i get the following page, with the server name KBWS01QX.
    But, from RSRT Tcode, select the query > query display as HTML > Click on ABAP Web , click execute as shown below, it is going to the correct URL as in the 2nd screen shot below.
    My question is why is it going to the wrong URL when i open it from  SAP Favorites menu?
    I want it to open the same URL as it opened from RSRT(which is the right one)
    What is the Config needed to make it to work from SAP favorites.
    Any help would be appreciated.
    Thanks alot.
    SV

    Hello,
    Thank you all for your responses.
    See below some additional info.
    From RSRT, this time I clicked on JAVA WEB, and i get the below URL, which is the same URL i was getting when i executed the query from SAP favorites.
    http://kbws01qx.xxxxxxx.com:50000/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?QUERY=ZCONSUMPTION
    Also, i have executed the Function module : RSBB_URL_PREFIX_GET and i get the below values.
    It seems that it is trying to connect to Java portal something services may be, but i want it to open in ABAP web only.
    Please help.

  • How to solve the problem when opening program illustrator cs6 ERROR: 16 It is WINDOWS 8.1 / 64 BIT help please

    how to solve the problem when opening program illustrator cs6
    ERROR: 16
    It is WINDOWS 8.1 / 64 BIT
    help please

    Thanks, Jeff! The file Adobe Setup Error.log contains the following information:
    02/14/14 07:20:26:474 | [INFO] |  | OOBE | DE |  |  |  | 8860 | DEVersion: 5.0.0.0
    02/14/14 07:20:26:475 | [INFO] |  | OOBE | DE |  |  |  | 8860 | Loading library from C:\Program Files (x86)\Common Files\Adobe\OOBE\PDApp\DECore\DE5\Setup.dll
    [    8860] Fri Feb 14 07:20:26 2014  INFO
    ::START TIMER:: [Total Timer]
    CHECK: Single instance running
    CHECK : Credentials
    Load Deployment File
    CHECK : Another Native OS installer already running
    Create Required Folders
    Assuming uninstall mode
    Lookup for master payload
    [    8860] Fri Feb 14 07:20:26 2014 ERROR
    DW040: The product "{893B3B44-0A1E-404B-8FE8-0A74509102A9}" is not installed. Cannot proceed with the uninstall
    [    8860] Fri Feb 14 07:20:26 2014  INFO
    :: END TIMER :: [Total Timer] took 6.90443 milliseconds (0.00690443 seconds) DTR = 579.338 KBPS (0.56576 MBPS)
    -------------------------------------- Summary --------------------------------------
    - 0 fatal error(s), 1 error(s), 0 warning(s)
    ERROR: DW040: The product "{893B3B44-0A1E-404B-8FE8-0A74509102A9}" is not installed. Cannot proceed with the uninstall
    Please search the above error/warning string(s) to find when the error occurred.
    These errors resulted in installer Exit Code mentioned below.
    Exit Code: 33 - The product is not installed, cannot uninstall.
    Please see specific errors and warnings for troubleshooting. For example, ERROR: DW040 ...

  • Problem with text formatting within a table in Adobe Forms

    Hi all,
    I have a table on a non-interactive Adobe form (which is a copy of the standard expense form PTRV_EXPENSE_FORM.  The table in ABAP has a text field with CHAR50.  On the form, the text field has a width which allows approximately 35 characters.  Therefore the text wraps onto a second line.  My problem is that the text is not formatted and words are just split randomly.
    For example:
    The fox ran across the fields and into the woods.
    would be output as:
    The fox ran across the fields and i
    nto the woods.
    How can the text be formatted to only output complete words?
    I have tried defining the textfield as text only and rich text, but nothing changes the output.
    Interestingly, even if I change the font size from say 10 to 8, the text is output the same, even though there is enough space for at least one more word on the first line.
    Has anyone else come across this problem?
    Thanks,
    Patricia

    Hi Syed
    The table is IT_RECEIPTS_ADD_INFO, field VALUE_CHAR.  In the form it is called Receipts_addl_info.
    I have just found out that the data is being re-formatted in the interface.  That caused the problem.  Many, many thanks for your help. 
    Best regards
    Patricia

  • Problem with opening of PDF in my webmail application

    I have a problem with opening a pdf file in my webmail application of my internet provider in apple safari since yesterday. When I wanted to open up a pdf file I got a pop up message to allow a connection between adobe and the webmail application which I did. Since then I can not open up a pdf file. If I go to another browser or if I use email from another internet provider I use too it works and I can open up. It seems to be a blockage of the specific combination of this webmail application and safari.
    What can I do ?

    Hi,
    I have same requirement.
    I need to cnvert smartform->pdf->send mail.
    The mail is send but the attachment is corrupted.
    Can you tell me what code you have written so its working in developement?

Maybe you are looking for

  • Error in sending ALV mail

    Hi, I am sending the ALV List through mail. But I am getting the error "MAXIMUM NUMBER OF INTERNAL SESSION REACHED". But without using the mail variant i am able to see the output. Mine mail functionality is not working

  • FaceTime, Mavericks and webcam...

    Hi, I just upgrade my Mac Mini to Mevericks and I want to use FacteTime for Mac. There are no webcams for sale in the Apple Store. You advise me to buy what webcam ? Thank you.

  • How to password protect my mail so not available on all my devices?

    How to password protect my mail so not available on all my devices?

  • Has anyone experienced this? Slow audio playback.

    I'm wondering if anyone has experienced the issue I'm having... I'm using the same Flash/XML MP3 player that I've used on many occasions, but for some reason now, some of the mp3s that I'm pulling in are playing at a slower pitch. Because It only hap

  • Os x won't install on mac pro

    i my trying to install os x on a new hdd on a mac book pro. it will show disk but will not allow me to click on it