Concurrnet Program of Executable type Host

Hi All,
I am facing some problems with Oracle Concurrent Programs whose executable type is 'Host'.
The program is completing normal but not processing anything, it not even printing proper logs and even going in to shell script written in .prog file.
Is it because, i had modified the .prog file and recreated the soft link??
Can you please help.
Thanks,
S

Hi,
Please mention the application release and the OS.
Have you completed all the steps in these documents?
Note: 156636.1 - How to Register a Host Concurrent Program in Applications
Note: 266268.1 - How To Create A Custom Concurrent Program With Host Method and Pass Parameters To The Shell Script
Note: 170878.1 - How to Register a Host Concurrent Program for NT
Thanks,
Hussein

Similar Messages

  • Concurrent program with executable of type HOST

    Hi,
    I am having 11.5.10.2 on Red Hat Linux AS 4 . I have created a shell script and I wanted it to run as a concurrent program.For that I created executable of type HOST and created one concurrent program and added it to one request group.
    This works fine. Concurrent program runs successfully.
    Then I used command line parameter in script. This parameter was added in respective concurrent program. But the parameter is passed as $1 as part of the
    the other standard parameters. So I have to extract my parameter from $1.
    My question is how to use parameters in 11.5.10.2 release ?
    Is there any solution so that we don't have to process $1 and extract user parameter? Can we pass the user parameter as $2 , $3 etc. ?

    Hi Hsawwan,
    Yeah I have already seen this document. It is not applicable to 11.5.10.2 because till 11.5.9 the $1 to $8 parameter were passed as standard parameters and user parameter was to be passed on as $9 onwards. This is fine.
    But I have seen that in 11.5.10.2 all the standard parameters are passed in $1 itself concatenated along with the user parameters. So we have to extract user parameter. Is there any better solution. ?
    Thanks .
    Sagar.

  • Program to execute WWW

    Hi Friends , 
              Can anyone please give the solution for the following issue
    To write an SAP program to execute the following.
    http://133.0.1.91:7777/epaprod
    http://pkg_epadb:7777/epaprod
    Hosts:
    Entry in hosts file.
    133.0.1.91     pkg_epadb
    Thanks in advance.

    *& Report  YH627_HTML_CONTROL
    REPORT  YH627_HTML_CONTROL.
    TYPE-POOLS: ICON.
    CLASS CLS_EVENT_HANDLER DEFINITION DEFERRED.
    G L O B A L  V A R I A B L E S
    DATA:
      OK_CODE                      LIKE SY-UCOMM,
    Container for html viewer
      W_HTML_CONTAINER             TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
    HTML viewer
      W_HTMLVIEWER                 TYPE REF TO CL_GUI_HTML_VIEWER,
    Container for toolbar
      W_TOOLBAR_CONTAINER          TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
    SAP Toolbar
      W_TOOLBAR                    TYPE REF TO CL_GUI_TOOLBAR,
    Event handler for toolbar
      W_EVENT_HANDLER              TYPE REF TO CLS_EVENT_HANDLER,
    Variable for URL text field on screen 100
      W_SCREEN100_URL_TEXT(255)    TYPE C,
      W_SCREEN100_DISPLAY_URL(255) TYPE C.
    I N T E R N A L   T A B L E S
    DATA:
    Table for button group
      T_BUTTON_GROUP            TYPE TTB_BUTTON,
    Table for registration of events. Note that a TYPE REF
    to cls_event_handler must be created before you can
    reference types cntl_simple_events and cntl_simple_event.
      T_EVENTS                  TYPE CNTL_SIMPLE_EVENTS,
    Workspace for table T_EVENTS
      FS_EVENT                  TYPE CNTL_SIMPLE_EVENT.
    START-OF-SELECTION.
      SET SCREEN '100'.
          CLASS cls_event_handler DEFINITION
    Handles events for the toolbar an the HTML viewer
    CLASS CLS_EVENT_HANDLER DEFINITION.
      PUBLIC SECTION.
        METHODS:
    Handles method function_selected  for the toolbar control
          ON_FUNCTION_SELECTED
            FOR EVENT FUNCTION_SELECTED OF CL_GUI_TOOLBAR
              IMPORTING FCODE,
    Handles method navigate_complete for the HTML viewer control
          ON_NAVIGATE_COMPLETE
            FOR EVENT NAVIGATE_COMPLETE OF CL_GUI_HTML_VIEWER
              IMPORTING URL.
    ENDCLASS.                              " CLS_EVENT_HANDLER DEFINITION
          CLASS cls_event_handler IMPLEMENTATION
    CLASS CLS_EVENT_HANDLER IMPLEMENTATION.
    Handles method function_selected  for the toolbar control
      METHOD ON_FUNCTION_SELECTED.
        CASE FCODE.
          WHEN 'BACK'.
            CALL METHOD W_HTMLVIEWER->GO_BACK
              EXCEPTIONS
                CNTL_ERROR = 1.
          WHEN 'FORWARD'.
            CALL METHOD W_HTMLVIEWER->GO_FORWARD
              EXCEPTIONS
                CNTL_ERROR = 1.
          WHEN 'STOP'.
            CALL METHOD W_HTMLVIEWER->STOP
              EXCEPTIONS
                CNTL_ERROR = 1.
          WHEN 'REFRESH'.
            CALL METHOD W_HTMLVIEWER->DO_REFRESH
              EXCEPTIONS
                CNTL_ERROR = 1.
          WHEN 'HOME'.
            CALL METHOD W_HTMLVIEWER->GO_HOME
              EXCEPTIONS
                CNTL_ERROR = 1.
          WHEN 'EXIT'.
            LEAVE TO SCREEN 0.
        ENDCASE.
      ENDMETHOD.                           " ON_FUNCTION_SELECTED
    Handles method navigate_complete for the HTML viewer control
      METHOD ON_NAVIGATE_COMPLETE.
      Display current URL in a textfield on the screen
        W_SCREEN100_DISPLAY_URL = URL.
      ENDMETHOD.                           " ON_FUNCTION_SELECTED
    ENDCLASS.                              "CLS_EVENT_HANDLER IMPLEMENTATION
    *&      Module  STATUS_0100  OUTPUT
    MODULE STATUS_0100 OUTPUT.
      IF W_HTML_CONTAINER IS INITIAL.
    Create container for HTML viewer
        CREATE OBJECT W_HTML_CONTAINER
          EXPORTING
            CONTAINER_NAME = 'HTML_CONTAINER'.
    Create HTML viewer
        CREATE OBJECT W_HTMLVIEWER
          EXPORTING PARENT = W_HTML_CONTAINER.
    Create container for toolbar
        CREATE OBJECT W_TOOLBAR_CONTAINER
          EXPORTING
               CONTAINER_NAME = 'TOOLBAR_CONTAINER'.
    Create toolbar
        CREATE OBJECT W_TOOLBAR
          EXPORTING
            PARENT = W_TOOLBAR_CONTAINER.
    Add buttons to the toolbar
        PERFORM ADD_BUTTON_GROUP.
    Create event table. The event ID must be found in the
    documentation of the specific control
        CLEAR FS_EVENT.
        REFRESH T_EVENTS.
        FS_EVENT-EVENTID    = W_TOOLBAR->M_ID_FUNCTION_SELECTED.
        FS_EVENT-APPL_EVENT = 'X'.         " This is an application event
        APPEND FS_EVENT TO T_EVENTS.
        FS_EVENT-EVENTID    = W_HTMLVIEWER->M_ID_NAVIGATE_COMPLETE.
        APPEND FS_EVENT TO T_EVENTS.
    Use the events table to register events for the control
        CALL METHOD W_TOOLBAR->SET_REGISTERED_EVENTS
          EXPORTING
            EVENTS = T_EVENTS.
        CALL METHOD W_HTMLVIEWER->SET_REGISTERED_EVENTS
          EXPORTING
            EVENTS = T_EVENTS.
    Create event handlers
        CREATE OBJECT W_EVENT_HANDLER.
        SET HANDLER W_EVENT_HANDLER->ON_FUNCTION_SELECTED
          FOR W_TOOLBAR.
        SET HANDLER W_EVENT_HANDLER->ON_NAVIGATE_COMPLETE
          FOR W_HTMLVIEWER.
      ENDIF.
    ENDMODULE.                             " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    MODULE USER_COMMAND_0100 INPUT.
    Handles the pushbutton for goto url
      CASE OK_CODE.
        WHEN 'GOTOURL'.
          PERFORM GOTO_URL.
      ENDCASE.
    ENDMODULE.                             " USER_COMMAND_0100  INPUT
    *&      Form  add_button_group
    Adds a button group to the toolbar
    FORM ADD_BUTTON_GROUP.
    BACK button
      CALL METHOD CL_GUI_TOOLBAR=>FILL_BUTTONS_DATA_TABLE
        EXPORTING
          FCODE      = 'BACK'
          ICON       = ICON_ARROW_LEFT
          BUTN_TYPE  = CNTB_BTYPE_BUTTON
          TEXT       = ''
          QUICKINFO  = 'Go back'
        CHANGING
          DATA_TABLE = T_BUTTON_GROUP.
    FORWARD button
      CALL METHOD CL_GUI_TOOLBAR=>FILL_BUTTONS_DATA_TABLE
        EXPORTING
          FCODE      = 'FORWARD'
          ICON       = ICON_ARROW_RIGHT
          BUTN_TYPE  = CNTB_BTYPE_BUTTON
          TEXT       = ''
          QUICKINFO  = 'Go forward'
        CHANGING
          DATA_TABLE = T_BUTTON_GROUP.
    STOP button
      CALL METHOD CL_GUI_TOOLBAR=>FILL_BUTTONS_DATA_TABLE
        EXPORTING
          FCODE      = 'STOP'
          ICON       = ICON_BREAKPOINT
          BUTN_TYPE  = CNTB_BTYPE_BUTTON
          TEXT       = ''
          QUICKINFO  = 'Stop'
        CHANGING
          DATA_TABLE = T_BUTTON_GROUP.
    REFRESH button
      CALL METHOD CL_GUI_TOOLBAR=>FILL_BUTTONS_DATA_TABLE
        EXPORTING
          FCODE      = 'REFRESH'
          ICON       = ICON_REFRESH
          BUTN_TYPE  = CNTB_BTYPE_BUTTON
          TEXT       = ''
          QUICKINFO  = 'Refresh'
        CHANGING
          DATA_TABLE = T_BUTTON_GROUP.
    Home button
      CALL METHOD CL_GUI_TOOLBAR=>FILL_BUTTONS_DATA_TABLE
        EXPORTING
          FCODE      = 'HOME'
          ICON       = ''
          BUTN_TYPE  = CNTB_BTYPE_BUTTON
          TEXT       = 'Home'
          QUICKINFO  = 'Home'
        CHANGING
          DATA_TABLE = T_BUTTON_GROUP.
    Separator
      CALL METHOD CL_GUI_TOOLBAR=>FILL_BUTTONS_DATA_TABLE
        EXPORTING
          FCODE      = 'SEP1'
          ICON       = ' '
          BUTN_TYPE  = CNTB_BTYPE_SEP
        CHANGING
          DATA_TABLE = T_BUTTON_GROUP.
    EXIT button
      CALL METHOD CL_GUI_TOOLBAR=>FILL_BUTTONS_DATA_TABLE
        EXPORTING
          FCODE      = 'EXIT'
          ICON       = ICON_CLOSE
          BUTN_TYPE  = CNTB_BTYPE_BUTTON
          TEXT       = ''
          QUICKINFO  = 'Close porgram'
        CHANGING
          DATA_TABLE = T_BUTTON_GROUP.
    Add button group to toolbar
      CALL METHOD W_TOOLBAR->ADD_BUTTON_GROUP
        EXPORTING
          DATA_TABLE = T_BUTTON_GROUP.
    ENDFORM.                               " ADD_BUTTON_GROUP
    *&      Form  goto_url
    Calls method SHOW_URL to navigate to an URL
    FORM GOTO_URL.
      CALL METHOD W_HTMLVIEWER->SHOW_URL
        EXPORTING
          URL = W_SCREEN100_URL_TEXT.
    ENDFORM.                               " GOTO_URL
    Before executing the program,
    you need to define HTML container and TOOLBAR container....
    So, double click on call screen 100 and then define the containers....
    Then give the URL which you want to give and then execute the program....
    Regards,
    Pavan P.

  • Submit a program to execute in background.

    Hi Everyone,
    Is there a way to submit a program to execute in background. So that the runtine is fast. Any help on this will be great.
    Thanks,
    Prabhu.

    Hi,
    Check this code -
    *Submit report as job(i.e. in background) 
    data: jobname like tbtcjob-jobname value
                                 ' TRANSFER TRANSLATION'.
    data: jobcount like tbtcjob-jobcount,
          host like msxxlist-host.
    data: begin of starttime.
            include structure tbtcstrt.
    data: end of starttime.
    data: starttimeimmediate like btch0000-char1.
    Job open
      call function 'JOB_OPEN'
           exporting
                delanfrep        = ' '
                jobgroup         = ' '
                jobname          = jobname
                sdlstrtdt        = sy-datum
                sdlstrttm        = sy-uzeit
           importing
                jobcount         = jobcount
           exceptions
                cant_create_job  = 01
                invalid_job_data = 02
                jobname_missing  = 03.
      if sy-subrc ne 0.
                                           "error processing
      endif.
    Insert process into job
    SUBMIT zreport and return
                    with p_param1 = 'value'
                    with p_param2 = 'value'
                    user sy-uname
                    via job jobname
                    number jobcount.
      if sy-subrc > 0.
                                           "error processing
      endif.
    Close job
      starttime-sdlstrtdt = sy-datum + 1.
      starttime-sdlstrttm = '220000'.
      call function 'JOB_CLOSE'
           exporting
                event_id             = starttime-eventid
                event_param          = starttime-eventparm
                event_periodic       = starttime-periodic
                jobcount             = jobcount
                jobname              = jobname
                laststrtdt           = starttime-laststrtdt
                laststrttm           = starttime-laststrttm
                prddays              = 1
                prdhours             = 0
                prdmins              = 0
                prdmonths            = 0
                prdweeks             = 0
                sdlstrtdt            = starttime-sdlstrtdt
                sdlstrttm            = starttime-sdlstrttm
                strtimmed            = starttimeimmediate
                targetsystem         = host
           exceptions
                cant_start_immediate = 01
                invalid_startdate    = 02
                jobname_missing      = 03
                job_close_failed     = 04
                job_nosteps          = 05
                job_notex            = 06
                lock_failed          = 07
                others               = 99.
      if sy-subrc eq 0.
                                           "error processing
      endif.
    URL: http://www.sapdevelopment.co.uk/reporting/rep_submit.htm
    Hope this code snippet helps you!

  • Program to execute ARCHIVFILE_CLIENT_TO_SERVER FM

    Hi experts;
    My knowhow of ABAP is very limited so be patience.
    I need to create a program to execute FM ARCHIVFILE_CLIENT_TO_SERVER.
    If you run it, the FM will ask you a path and a targetpath.
    my path should be
    pclis02\consult\Equipa_EM\Line_TEXT.csv (CSV file that is in the customer network)
    my targetpath should be
    debtdc00\sapmnt\trans_DEB\LINE (to be located in application server)
    Can anyone help me building the program?
    Best regards;
    Ricardo

    DATA:W_FILEPATH TYPE SAPB-SAPPFAD,
         W_SPATH TYPE SAPB-SAPPFAD.
    W_SPATH = '
    pclis02\consult\Equipa_EM\Line_TEXT.csv'.
    W_FILEPATH = '
    debtdc00\sapmnt\trans_DEB\LINE '.
              CALL FUNCTION 'ARCHIVFILE_CLIENT_TO_SERVER'
                EXPORTING
                  PATH            = W_SPATH
                 TARGETPATH       = W_FILEPATH
               EXCEPTIONS
                 ERROR_FILE       = 1
                 OTHERS           = 2

  • Calling VB Executable using HOST to Slow....

    Hello Friends,
    I have one form containg one program unit, Program unit has one cursor,which contains Employee Id and Email Id, Based on Employee ID Report is generated in HTML Format.Next I am Calling VB Executable using HOST which Sends generated report through mail based on EmailId. I am passing Report File and EmailId using Command line arguments.
    But,It takes too much time to return back to Form from VB application ? It quickly exits VB applications but then it takes too much time to return back to Oracle Forms ?
    What can be the reason ?
    Adi

    There is a JNI forum, you may have better luck there.

  • Calling VB Executable using HOST too Slow....

    Hello Friends,
    I have one form containg one program unit, Program unit has one cursor,which contains Employee Id and Email Id, Based on Employee ID Report is generated in HTML Format.Next I am Calling VB Executable using HOST which Sends generated report through mail based on EmailId. I am passing Report File and EmailId using Command line arguments.
    But,It takes too much time to return back to Form from VB application ? It quickly exits VB applications but then it takes too much time to return back to Oracle Forms ?
    What can be the reason ?
    Adi

    exactly, I think we were too impatient.
    It seemed working well after deleting half of snapshots, but just next day it occurred again.
    of course the system is maintaining snapshots just half of the original, but it became slow because unknown reason.
    we've tested something like following because we doubt that zpool was related to the too low performance.
    case 1 : 1 zpool, 1*500MB mkfile, 50*100MB mkfile at any time
    case 2 : 20 zpool, 1*500MB mkfile to ONE zpool, 2~3*100MB mkfile PER zpool at any time
    case 3 : 1 zpool, just 1*500MB mkfile
    in case 1 and 2, 'at any time' means that 100MB mkfile processes were maintained to restart when finished again and again.
    we estimated the time to write 500MB for each case.
    case 1 result : about 6 minutes
    case 2 result : about 16 minutes
    case 3 result : about 4 seconds
    in the case 1, the test was harder than our real-world situation, but it took only 6 minutes.
    our system log told us that writing about 1GB took more than 50 minutes!!!
    do anyone know why the tests above result like this?
    and our zfs performance is still problem.
    please reply anything about our situation.
    we'll of course test the ARC size. thank about this.
    thank you.

  • ERROR OGG-01148 programming error, data type not supported for column

    I am getting following error when I put null in insert statement
    2011-03-31 18:30:45 ERROR OGG-01148 programming error, data type not supported for column TXID in table advoss.tblaudittrail.
    I am replicating MySQL 5.5.9 to Oracle 11g rel2 via goldengate 11

    I am able to diagnose what is cuasing the problem
    unsigned flag was the culprit of this error
    I am able to insert null after removing unsigned flag.
    thank you very much for your kind support

  • Program should execute both for F8 and F9

    Hi All,
    I have a requirement that my program should execute both for F8 and F9.
    I have developed it as a report as the selection-screen contains 'Select-Options' and they want the Multiple Selection Button.
    I know that if I develop it as a Module pool, my problem is very easily solved.
    But since they want the Multiple-Selection button for Select-options which we cannot provide in a Module-Pool I am forced to develop a report.
    Please let me know if its possible to execute the program with both F8 and F9 function keys, while F8 can be the normal execute button, there is no need of any button for F9, that is a F9 key press is enough. The Report should execute if the user presses F8 or F9 key on the Key-board.
    Hope I am clear.
    Please help me with your suggestions.
    Thanks in Advance.
    Edited by: Dagny on Apr 1, 2009 6:57 AM

    Hi, Dangy
    I dont think you can do with f9 fkey,
    but you can do with ctrl+f9 , if ur client like this..
    this are some available FKeys.
    Freely assigned function keys
    F5
    F6
    F7
    F8                             ONLI       Execute
    Shift-F1                       DOCU       Program Documenta...
    Shift-F6                       SCRH       Selection Screen ...
    Shift-F7                       ALLS       All Selections
    Shift-F8                       FEWS       Chosen Selections
    Shift-F9
    Shift-Ctrl-0
    Shift-F11
    Shift-F12
    Ctrl-F1                        FC01       <SSCRFIELDS-FUNC...>
    Ctrl-F2                        FC02       <SSCRFIELDS-FUNC...>
    Ctrl-F3                        FC03       <SSCRFIELDS-FUNC...>
    Ctrl-F4                        FC04       <SSCRFIELDS-FUNC...>
    Ctrl-F5                        FC05       <SSCRFIELDS-FUNC...>
    Ctrl-F6                        LVUV       User Variables...
    Ctrl-F7
    Ctrl-F8
    Ctrl-F9
    Ctrl-F10
    Ctrl-F11
    Ctrl-F12
    Ctrl-Shift-F1
    Ctrl-Shift-F2
    Ctrl-Shift-F3
    Ctrl-Shift-F4
    Ctrl-Shift-F5
    Ctrl-Shift-F6
    Ctrl-Shift-F7
    Ctrl-Shift-F8
    Ctrl-Shift-F9
    Ctrl-Shift-F10
    Ctrl-Shift-F11
    Ctrl-Shift-F12
    Just execute ur program, and go to system>status->in SAP data , there is GUI status-> dbl clik in ur gui status and assign Fcode for ctrl+f9 and handle the same in user command.
    I hope it will solve ur problem.

  • Need to execute a FM before any program is executed

    Friends, I have a requirement of executing a FM before every Z program is executed in Background. Can anyone plz suggest a way to accomplish this. Otherwise we may have to change all programs to incorporate FM call.
    Thanks friends
    Bhaskar

    Just trying to do more digging......
    Is there any SAP Program or FM that executes before any program is executed or is there any provision so that I can execute another Z-program(this inturn contains FM) before I execute any other program......Or can events be used by any change......
    all suggestions welcome....
    Thanks all for visiting this post...
    Bhaskar

  • Is there any way to upload iWeb files updates only with a 3rd party ftp program to a new hoster, e.g. Godaddy? I see no posts newer than 2007

    Is there any way to upload iWeb files updates only with a 3rd party ftp program to a new hoster, e.g. Godaddy? I see no posts newer than 2007.

    If you are using iWeb V 3, there are two other options for publishing the site...
    http://www.iwebformusicians.com/iWeb/Publish-Website.html
    Some pointers for choosing hosting...
    http://www.iwebformusicians.com/iWeb/Website-Hosting.html

  • Program error: Object type of receiver cannot be determined

    Hello Experts,
                   Am getting this error "Program error: Object type of receiver cannot be determined" when creating internal orders using BAPI_INTERNALORDERS_CREATE. I read many forums, but they are not answered. I didn't get any solution. Any Solution Please.
    Thanks in Advance

    Here is my Code
    TYPE-POOLS : TRUXS.
    TYPES:BEGIN OF TY_COAS_SVALD,
          AUART TYPE AUFART,         "Order Type
          BUKRS TYPE BUKRS,          "Company Code
          KTEXT TYPE AUFTEXT,        "Description
          GSBER TYPE GSBER,          "Business Area
          WERKS TYPE WERKS_D,        "plant
          KDAUF TYPE KDAUF,          "Sales Order Number
          KDPOS TYPE KDPOS,          "Item
          USER0 TYPE AUFUSER0,       "Applicant
          USER1 TYPE AUFUSER1,       "Applicant's telephone number
          USER2 TYPE AUFUSER2,       "Person responsible
          USER6 TYPE AUFUSER6,       "Department
          KOKRS TYPE KOKRS,          "Controlling area
          AUFWAERS TYPE AUFWAERS,    "Currency
          END   OF TY_COAS_SVALD .
    DATA : IT_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.
    DATA:T_COAS TYPE STANDARD TABLE OF TY_COAS_SVALD INITIAL SIZE 0,
        WA_COAS TYPE  TY_COAS_SVALD.
    PARAMETERs : p_file TYPE IBIPPARMS-PATH.
    at SELECTION-SCREEN on VALUE-REQUEST FOR p_file.
      PERFORM browse_file.
    INITIALIZATION.
      CLEAR:WA_COAS.
      REFRESH:T_COAS.
    START-OF-SELECTION.
    PERFORM LOAD_FLAT_FILE.
    PERFORM SUB_CALL_BAPI_FOR_KO01.
    FORM browse_file .
    CALL FUNCTION 'F4_FILENAME'
    IMPORTING
       FILE_NAME           = p_file
    ENDFORM.                    " browse_file
    FORM LOAD_FLAT_FILE .
    DATA : LT_RAW TYPE TRUXS_T_TEXT_DATA.
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
          I_FIELD_SEPERATOR          = 'X'
         I_LINE_HEADER              = 'X'
          I_TAB_RAW_DATA             = LT_RAW
          I_FILENAME                 = P_FILE
        TABLES
          I_TAB_CONVERTED_DATA       = T_COAS
       EXCEPTIONS
         CONVERSION_FAILED          = 1
         OTHERS                     = 2
      IF SY-SUBRC <> 0.
      ENDIF.
    ENDFORM.                    " LOAD_FLAT_FILE
    FORM SUB_CALL_BAPI_FOR_KO01 .
      DATA:L_MASTERDATA  TYPE BAPI2075_7,
           LE_MASTERDATA TYPE BAPI2075_2,
           T_BAPI TYPE STANDARD TABLE OF BAPI2075_6 INITIAL SIZE 0,
           WA_BAPI TYPE BAPI2075_6.
    clear:l_masterdata,
          le_masterdata,
          wa_bapi.
    refresh:t_bapi.
      LOOP AT T_COAS INTO WA_COAS.
      L_MASTERDATA-ORDER_TYPE = WA_COAS-AUART.
      L_MASTERDATA-COMP_CODE = WA_COAS-BUKRS.
      L_MASTERDATA-ORDER_NAME = WA_COAS-KTEXT.
      L_MASTERDATA-PLANT = WA_COAS-WERKS.
      L_MASTERDATA-BUS_AREA = WA_COAS-GSBER.
      L_MASTERDATA-SALES_ORD = WA_COAS-KDAUF.
      L_MASTERDATA-S_ORD_ITEM = WA_COAS-KDPOS.
      L_MASTERDATA-APPLICANT = WA_COAS-USER0.
      L_MASTERDATA-APPLICANT_PHONE = WA_COAS-USER1.
      L_MASTERDATA-PERSON_RESP = WA_COAS-USER2.
      L_MASTERDATA-DEPARTMENT = WA_COAS-USER6.
      L_MASTERDATA-CO_AREA = WA_COAS-KOKRS.
      L_MASTERDATA-CURRENCY = WA_COAS-AUFWAERS.
      WA_BAPI-SALES_ORD = WA_COAS-KDAUF.
      WA_BAPI-S_ORD_ITEM = WA_COAS-KDPOS.
      WA_BAPI-COMP_CODE = WA_COAS-BUKRS.
      APPEND WA_BAPI TO T_BAPI.
    CALL FUNCTION 'BAPI_INTERNALORDER_CREATE'
          EXPORTING
            I_MASTER_DATA       = L_MASTERDATA
    IMPORTING
       E_MASTER_DATA       = LE_MASTERDATA
    TABLES
       SRULES              = T_BAPI
       RETURN              = IT_RETURN
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      ENDLOOP.
      WRITE : / IT_RETURN-TYPE, IT_RETURN-MESSAGE.
    ENDFORM.                    " SUB_CALL_BAPI_FOR_KO01

  • Disallow java program to execute external command

    How to disallow java program to execute some external command.
    Thank.

    It work by using custom policy, thank
    Test.java
            String command1[] = {"/bin/ls","-a,","-l"};
            String command2[] = {"/bin/pwd"};
            Runtime runtime = Runtime.getRuntime();
            try{
                Process p1 = runtime.exec(command1);
                Process p2 = runtime.exec(command2); // AccessControlException: access denied
                Scanner s1 = new Scanner(p1.getInputStream());
                Scanner s2 = new Scanner(p2.getInputStream()); 
                System.out.println(s1.nextLine());
                System.out.println(s2.nextLine()); 
            }catch(Exception ex){
               ex.printStackTrace();
            }java.policy
    grant{
       permission java.io.FilePermission "/bin/ls", "execute";
    }Run
    $java -Djava.security.manager -Djava.security.policy=java.policy Test
    java.security.AccessControlException: access denied (java.io.FilePermission /bin/pwd execute)

  • Error while triggering program through output type while saving invoice

    Hi,
    I have a scenario where in my Z program needs to be triggered when saving a invoice.
    For that we have attached out Z program to output type which gets picked while saving invoice.
    In the Z program we have written the entire code in Form Entry subroutine.
    In the Z program we have called a FM "SD_SALESDOCUMENT_CREATE", to create a sales order.
    After sales order is created we have used a Commit statement.
    If I run the Z program individually, Salesorder gets created perfectly.
    How ever as per scenario when trying to save the invoice, output type gets picked. But program doesn't get called.
    and when I go to the saved the invoice I get the following error immediately:
    "Error document - Update was terminated"
    I have found that the problem is with COMMIT statement through transaction SM13.
    Can anybody help me with this. I cannot save the sales order without COMMIT, so I have to use it.
    Thanks in Advance,
    Rohan.

    Hi Rohan,
    I have worked on almost similar kind of requirement as you. 
    "Error document - Update was terminated" is because saving of invoice is done in u201CUpdate Tasku201D. Again in that work process, FM also calls for update task, which is not allowed and give short dump.
    Here are two different approaches to cope up in this scenario.
    1.Call FM in NEW TASK.
    Calling Function module in new task will assign new work process and will use different update task.
    Use:
    CALL FUNCTION 'SD_SALESDOCUMENT_CREATE' STARTING NEW TASK 'task'
    This will not give update termination error.
    Call of FM in this way will work, but as this will be asynchronies call you will be not able to get status/message out of the FM call result.
    If capturing return message is mandatory, use below approach
    2, Process output type via Job
    Set output type, dispatch time u201CSend with periodically scheduled jobu201D in u201CDefault valueu201D tab.
    Run batch job for program u201CRSNAST00u201D with appropriate variant.
    Please let me know if you need any further details.
    Best Regards,
    Nisarg

  • Executing the host application

    Hi, i developed a host application with OCF to communicate with my applet, everything is OK. now i wonder if i can execute the host application from an HTML page

    SYNCHRONIZE will update the display with the internal stae of the application (so don't think you should be expecting any performance improvements).
    HOST command will generally run synchronously - so it will wait for the host command to finish executing. If you want to asynchronously you could HOST out to a BAT file a put your commands in the BAT file.
    Regards
    Grant Ronald
    Forms Product Management

Maybe you are looking for

  • Error While extracting data from FIAA and FIAP

    Hi Gurus, I am facing error while extracting data from R/3 Source. 0FIAA, 0FIAP datasources. I am getting the same error repeatedly. No data will come BW. When I checked in RSA3 I can extract records. Ther Error is as follows: Request still running D

  • HT4796 have migrated the info from old pc to mac, but cant access it, and ideas?

    i have migrated the info from my old PC, but cannot access it, any advice please?

  • Menu Bar Code Help

    I am new to Java and am trying to make a menu bar applet for a web page. I think i have the majority of it finished there are three things i could not figure out and i was wondering if someone might be able to help. The things are: Opening Urls in th

  • Why I cannot connect to database after deploying application to OAS?

    Hello experts...i have a new problem and here are the facts: I`m using on Windows Xp: Oracle Database 10.2.0 Oracle Application Server 10.1.3 Oracle Jdeveloper 10.1.3.3 I`m creating a new application using jdeveloper and i`m using 2 connection classe

  • Serial ATA vs. Ultra ATA/100

    Hi. My Macbooks HD crashed last weekend (folder with questionmark, etc.) and I went online to find out what the reason is. After reading some discussion boards I decided to order a new one. So I did order a TravelStar 5K160. It arrived yesterday and