Pro*c sample programs

could anyone direct me to where the sample pro*c programs (e.g., cppdemo1.pc) are? I don't find them in the instant client precompiler packages.
Thanks in advance.

I have experienced similar to your PRO*C problems when trying to
compile the code containing function with variable number of
arguments (ellipse). The Pro*C complaind about the line
containing: va_list args;. It simply seems that in 8i version of
Oracle the PRO*C is not capable to preprocess this kind of
construct (and in your example there are more constructs it does
not cope with ;-).
My workaround was to set PARSE=PARTIAL option. Then the PRO*C is
only pre-processing the code found in declare sections and in
EXEC SQL sections. This means that the pre-processor will work
fine if you don't put the 'unparsable' constructs in any of
these sections. It worked for me... at least.
Regards,
P.

Similar Messages

  • Can not find Pro *C sample program after install oracle

    Hello,
    just start learning Pro *C, according to the document: you will find sample programs in ORACLE_BASE\ORACLE_HOME\precomp\demo\proc, but after i installed oracle client 11g on win7, the folder looks like following
    \precomp
      \admin
      \doc
      \LIB
      \mesg
      \public
    no demo folder found.
    did i miss something during installation?
    Thanks in advance

    You need to install the Examples. This is the 6th zip file of the installation DVDs.

  • Memory leak in OCI Direct Path sample program in threaded mode

    I have a slightly (okay, more than slightly) modified version of the sample program cdemodp.c, which uses OCI to do a Direct Path load. Since my eventual aim is to make a C++ module that loads a table from a file as part of a multithreaded program, I made the necessary changes so that cdemodp.c would compile with g++ (v3.3.1, on Solaris 2.8), and I put in the following in place of the OCIInitialize() and OCIEnvCreate() calls (since the docs say those are deprecated):
    OCI_CHECK(0, 0, ociret, ctlp, OCIEnvCreate(&ctlp->envhp_ctl, OCI_THREADED, (void *) 0, 0, 0, 0, (size_t) 0, (void **) 0));
    When I compile and run this version of the program using Purify, I get a 60-byte memory leak inside the OCI code (meaning I can't see the source-code line that is causing the leak). I am pretty sure it's not anything in my code (i.e., me failing to free all handles or something) because when I change the above line so that the mode parameter is OCI_DEFAULT and recompile, there is no memory leak. Since this will be part of a threaded application that is always running, it is critical to make sure there are no leaks.
    Purify says that the leaked memory was allocated from:
    malloc [rtlib.o]
    calloc [rtlib.o]
    nlepeinit [nlepe.c]
    nlstdggo [nlstdgo.c]
    nlstdgg [nlstdgo.c]
    nigini1 [nigini.c]
    I am using Oracle 10g (client version 10.1.0).
    Anyone else had this happen?
    Thanks,
    --Tina Mancuso                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    This sounds very similar to the memory leak I have in Oracle 9i using Pro*C++. Everytime a connect is made memory appears to leak and it only happens in multithreaded mode not default mode. There is a thread about this under the Oracle C++ call interface. Under 9i it appears to leak about 60K per connect rather than 60 bytes.
    Paul

  • 8i: PRO*C Sample Compile Problems

    I'm fairly new to Linux but not to Oracle. I am trying to
    compile the sample PRO*C programs and running into difficulty.
    The first problem I had was that $ORACLE_HOME/bin/proc was not
    installed with execute permissions (strange that the OUI didn't
    set the permisssions properly; I checked the root.sh file, but
    nothing was there for proc).
    After setting execute permissions (chmod +x proc), I ran the
    following from $ORACLE_HOME/precomp/demo/proc
    ---- cut ----
    [oracle@skinner proc]$ make -f demo_proc.mk sample1
    gmake -
    f /u01/app/oracle/product/8.1.5/precomp/demo/proc/demo_proc.mk
    OBJS=sample1.o EXE=sample1 build
    gmake[1]: Entering directory
    `/u01/app/oracle/product/8.1.5/precomp/demo/proc'
    proc iname=sample1
    Pro*C/C++: Release 8.1.5.0.0 - Production on Sun Aug 15 15:05:47
    1999
    (c) Copyright 1999 Oracle Corporation. All rights reserved.
    System default option values taken
    from: /u01/app/oracle/product/8.1.5/precomp/admin/pcscfg.cfg
    Error at line 33, column 11 in file /usr/include/stdio.h
    # include <stddef.h>
    ..........1
    PCC-S-02015, unable to open include file
    Error at line 38, column 11 in file /usr/include/stdio.h
    # include <stdarg.h>
    ..........1
    PCC-S-02015, unable to open include file
    Error at line 29, column 10 in file /usr/include/bits/types.h
    #include <stddef.h>
    .........1
    PCC-S-02015, unable to open include file
    Error at line 14, column 10 in file /usr/include/_G_config.h
    #include <stddef.h>
    .........1
    PCC-S-02015, unable to open include file
    Error at line 48, column 11 in file /usr/include/libio.h
    # include <stdarg.h>
    ..........1
    PCC-S-02015, unable to open include file
    gmake[1]: *** [sample1.o] Segmentation fault (core dumped)
    gmake[1]: Leaving directory
    `/u01/app/oracle/product/8.1.5/precomp/demo/proc'
    make: *** [sample1] Error 2
    [oracle@skinner proc]$
    ---- cut ----
    I can see from previous threads that others have gotten PRO*C to
    work, but I didn't see anything specifically about this
    problem. Will someone please tell me what I'm doing wrong?
    Making the sample PRO*C programs has always been a simple matter
    on other UNIX machines. I suspect that Oracle's default install
    is assuming libc instead of glibc, but I'm not familiar enough
    with Linux to fix this.
    I am running RedHat 6.0 with all of updates applicable to my
    system applied.
    null

    This was better.
    http://govt.oracle.com/~tkyte/proc_makefile/
    Thanks for the first step.
    I drove myself up the wall for 3 days.
    -Anand Vadul.
    John Smiley (guest) wrote:
    : OK, I've made some progress. I am now able to compile the
    : sample programs. I took the following actions:
    : 1. set up $ORACLE_HOME/precomp/admin/pcscfg.cfg per the readme
    : file (missed this on the first round.)
    : 2. Added
    : define=_STDIO_H
    : define=_STRING_H
    : define=_STDLIB_H
    : to the standard pcscfg.cfg
    : 3. Added
    : #define size_t unsigned int
    : to each sampleX.pc file to avoid segmentation fault (core
    dump).
    : Now I have another question. Why were steps 2 and 3 necessary
    : (step 1 was my fault)? Has anyone else out there solved this
    : problem a different (better) way?
    : John Smiley (guest) wrote:
    : : I'm fairly new to Linux but not to Oracle. I am trying to
    : : compile the sample PRO*C programs and running into
    : difficulty.
    : : The first problem I had was that $ORACLE_HOME/bin/proc was
    not
    : : installed with execute permissions (strange that the OUI
    : didn't
    : : set the permisssions properly; I checked the root.sh file,
    but
    : : nothing was there for proc).
    : : After setting execute permissions (chmod +x proc), I ran the
    : : following from $ORACLE_HOME/precomp/demo/proc
    : : ---- cut ----
    : : [oracle@skinner proc]$ make -f demo_proc.mk sample1
    : : gmake -
    : : f
    /u01/app/oracle/product/8.1.5/precomp/demo/proc/demo_proc.mk
    : : OBJS=sample1.o EXE=sample1 build
    : : gmake[1]: Entering directory
    : : `/u01/app/oracle/product/8.1.5/precomp/demo/proc'
    : : proc iname=sample1
    : : Pro*C/C++: Release 8.1.5.0.0 - Production on Sun Aug 15
    : 15:05:47
    : : 1999
    : : (c) Copyright 1999 Oracle Corporation. All rights reserved.
    : : System default option values taken
    : : from: /u01/app/oracle/product/8.1.5/precomp/admin/pcscfg.cfg
    : : Error at line 33, column 11 in file /usr/include/stdio.h
    : : # include <stddef.h>
    : : ..........1
    : : PCC-S-02015, unable to open include file
    : : Error at line 38, column 11 in file /usr/include/stdio.h
    : : # include <stdarg.h>
    : : ..........1
    : : PCC-S-02015, unable to open include file
    : : Error at line 29, column 10 in file /usr/include/bits/types.h
    : : #include <stddef.h>
    : : .........1
    : : PCC-S-02015, unable to open include file
    : : Error at line 14, column 10 in file /usr/include/_G_config.h
    : : #include <stddef.h>
    : : .........1
    : : PCC-S-02015, unable to open include file
    : : Error at line 48, column 11 in file /usr/include/libio.h
    : : # include <stdarg.h>
    : : ..........1
    : : PCC-S-02015, unable to open include file
    : : gmake[1]: *** [sample1.o] Segmentation fault (core dumped)
    : : gmake[1]: Leaving directory
    : : `/u01/app/oracle/product/8.1.5/precomp/demo/proc'
    : : make: *** [sample1] Error 2
    : : [oracle@skinner proc]$
    : : ---- cut ----
    : : I can see from previous threads that others have gotten PRO*C
    : to
    : : work, but I didn't see anything specifically about this
    : : problem. Will someone please tell me what I'm doing wrong?
    : : Making the sample PRO*C programs has always been a simple
    : matter
    : : on other UNIX machines. I suspect that Oracle's default
    : install
    : : is assuming libc instead of glibc, but I'm not familiar
    enough
    : : with Linux to fix this.
    : : I am running RedHat 6.0 with all of updates applicable to my
    : : system applied.
    null

  • Error while compiling xdk C sample program

    hello,
    the following error happens with xdk version 9.2.0.6 and oracle 9.2.0.4 installed on linux SUSE 9.1:
    while compiling the xdk C sample program "SAXSample.c" in
    $ORACLE_HOME/xdk/demo/c/parser, I got many "undefined reference" messages.
    Here follows an excerpt of the first few lines of the error log:
    oracle@cassius:/exp/oracle/xdk/demo/c/parser> make SAXSample
    cc -o SAXSample -I ../../../../xdk/include SAXSample.c -L ../../../../lib -lxml9 -lxsd9 -lcore9 -lnls9 -lunls9 -lcore9 -lnls9 -lcore9 -lnls9 -lnsl -lm -lpthread
    ../../../../lib/libxml9.a(lpxerr.o)(.text+0x4d9): In function `LpxErrVPrintf':
    : undefined reference to `__ctype_b'
    ../../../../lib/libxml9.a(lpxm.o)(.text+0x37dd): In function `LpxmA2L':
    : undefined reference to `__ctype_b'
    ../../../../lib/libxml9.a(lpxm.o)(.text+0x38f9): In function `LpxmA2UL':
    : undefined reference to `__ctype_b'
    and so on.
    Has anybody had this problem before? What's wrong with the libraries?
    Thanks in advance.

    I don't see a specific Proc or precompiler forum around here.
    Perhaps your best bet would be at [Call interface (OCI)|http://forums.oracle.com/forums/forum.jspa?forumID=67] forum or maybe [SQL and PL/SQL|http://forums.oracle.com/forums/forum.jspa?forumID=75] since it's more of a developers' forum.

  • Need a sample program for hierarchial oops ALV report

    Hello experts,
                     I Need a sample program for hierarchial oops ALV report.

    Hi,
       Check the following sample code...
    T A B L E S
    tables : ekko.
      data definition
    types : begin of ty_ekko,
              ebeln type ekko-ebeln,
              lifnr type ekko-lifnr,
              bsart type ekko-bsart,
              aedat type ekko-aedat,
              ernam type ekko-ernam,
            end of ty_ekko.
    types : begin of ty_eket,
               ebeln type ekpo-ebeln,
               ebelp type ekpo-ebelp,
               werks type ekpo-werks,
               matnr type ekpo-matnr,
               menge type eket-menge,
               wamng type eket-wamng,
               netpr type ekpo-netpr,
            end of ty_eket.
    data : it_ekko type table of ty_ekko,
           it_eket type table of ty_eket.
    data: ob_hieralv type ref to cl_salv_hierseq_table.
    data: it_binding type salv_t_hierseq_binding,
          is_binding type salv_s_hierseq_binding.
    S E L C T O P T I O N S
    select-options : s_ebeln for ekko-ebeln.
    S T A R T O F S E L E C T I O N
    start-of-selection.
    select ebeln
           lifnr
           bsart
           aedat
           ernam from ekko
    into corresponding fields of table it_ekko
    where ebeln in s_ebeln.
    if sy-subrc eq 0.
    select aebeln aebelp
           awerks amatnr
           bmenge bwamng
           a~netpr from ekpo as a join eket as b
                     on  amandt = bmandt
                     and aebeln = bebeln
                     and aebelp = bebelp
                   into corresponding fields of table it_eket
                  where a~ebeln in s_ebeln.
    endif.
    is_binding-master = 'EBELN'.
    is_binding-slave = 'EBELN'.
    append is_binding to it_binding.
    *TRY.
    call method cl_salv_hierseq_table=>factory
    exporting
    t_binding_level1_level2 = it_binding
    importing
    r_hierseq = ob_hieralv
    changing
    t_table_level1 = it_ekko
    t_table_level2 = it_eket .
    *CATCH cx_salv_data_error .
    *CATCH cx_salv_not_found .
    *ENDTRY.
    call method ob_hieralv->display( ).
    Cheers,
    Ram

  • Sample program for FM: BAPI_ACC_INVOICE_RECEIPT_POST

    Can anyone provide a sample program using the function module - BAPI_ACC_INVOICE_RECEIPT_POST.
    Thanx in advance.
    <b><REMOVED BY MODERATOR></b>
    -Mohan
    Message was edited by:
            Alvaro Tejada Galindo

    Hi,
    Check these links -
    BAPI_ACC_INVOICE_RECEIPT_POST
    http://translate.google.com/translate?hl=en&sl=ru&u=http://www.sapnet.ru/viewtopic.php%3Fp%3D313%26sid%3D9fb6646f6842ff46850081e2cc94ba82&sa=X&oi=translate&resnum=10&ct=result&prev=/search%3Fq%3DBAPI_ACC_INVOICE_RECEIPT_POST%2Bcode%26hl%3Den%26sa%3DG
    http://translate.google.com/translate?hl=en&sl=zh-CN&u=http://blog.csdn.net/CompassButton/archive/2007/05/08/1600607.aspx&sa=X&oi=translate&resnum=9&ct=result&prev=/search%3Fq%3DBAPI_ACC_INVOICE_RECEIPT_POST%2Bcode%26hl%3Den%26sa%3DG
    Hope this helps.
    ashish

  • Does the Macbook Pro have a program to run Windows? If not, what is the best program to do so?

    Does the Macbook Pro have a program to run Windows built in? If not, what is the best program to do so. Purchasing a new Mac.

    No. The Mac does not have anything to run Windows
    You must install either virtualizrion software or use BootCamp to create a partition for Windows. Once you have done that then you must install Windows.
    Allan

  • OCI - Sample program works on Windows but gives error in Solaris ??

    Hi,
    I am new to OCI. I was trying the following sample program:
    #include<iostream>
    #include<conio.h>
    #include<firstheader.h>
    //#include<stdafx.h>
    #include<string.h>
    using namespace std;
    class OCIClass
    public:
         OCIClass()
    int p_bvi;
    char p_sli[20];
    int rc;
    char errbuf[100];
    int errcode;
    const char *s;
    printf("Hello\n");
    string sql;
    string sql2="select substr(ename,1,3) from emp where job='ANALYST'";
    cout<<sql2;
    //char sql[512];
    int flag=0;
    sql += "SELECT * from emp where job='";
    if (flag==0)
    sql += "MANAGER";
    else
    sql += "ANALYST";
    sql += "'";
    cout<<sql + "\n";
    s=sql.c_str();
    char* cstr = new char[sql.size()+1];
    strcpy (cstr, sql.c_str());
    char* cstr2 = new char[sql2.size()+1];
    strcpy (cstr2, sql2.c_str());
    sql=" ";
    /* Initialize evironment */
    rc=OCIEnvCreate((OCIEnv **)&p_env,(ub4)OCI_DEFAULT ,(void *)0, (void * (*)(void *, size_t))0,
    (void * (*)(void *, void *, size_t))0,(void (*)(void *, void *))0,(size_t)0, (void **)0);
    /* Initialize handles */
    rc = OCIHandleAlloc( (dvoid *) p_env, (dvoid **) &p_err, OCI_HTYPE_ERROR,
    (size_t) 0, (dvoid **) 0);
    printf("Error handle allocated\n");
    rc = OCIHandleAlloc( (dvoid *) p_env, (dvoid **) &p_svc, OCI_HTYPE_SVCCTX,
    (size_t) 0, (dvoid **) 0);
    printf("service handle allocated\n");
    printf("Value of RC before Logon\n %d", rc);
    /* Connect to database server */
    rc = OCILogon(p_env, p_err, &p_svc, (OraText *)"scott", 5,(OraText *) "welcome", 7,(OraText *) "", 0);
    printf("Value of RC after Logon\n %d", rc);
    if (rc != 0) {
    OCIErrorGet((dvoid *)p_err, (ub4) 1, (text *) NULL, &errcode, (OraText *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR);
    printf("Error - %s\n",errbuf);
         printf("error");
    //exit(8);
         getch();
    printf("Connect successful\n");
    /* Allocate and prepare SQL statement */
    rc = OCIHandleAlloc( (dvoid *) p_env, (dvoid **) &p_sql,
    OCI_HTYPE_STMT, (size_t) 0, (dvoid **) 0);
    rc = OCIStmtPrepare(p_sql, p_err, (OraText*) cstr,
    (ub4) 37, (ub4) OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT);
    /* Bind the values for the bind variables
    p_bvi = 10; /* Use DEPTNO=10
    rc = OCIBindByName(p_sql, &p_bnd, p_err, (text *) ":x",
    -1, (dvoid *) &p_bvi, sizeof(int), SQLT_INT, (dvoid *) 0,
    (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT);*/
    /* Define the select list items */
    rc = OCIDefineByPos(p_sql, &p_dfn, p_err, 1, (dvoid *) &p_sli,
    (sword) 20, SQLT_STR, (dvoid *) 0, (ub2 *)0,
    (ub2 *)0, OCI_DEFAULT);
    /* Execute the SQL statment */
    rc = OCIStmtExecute(p_svc, p_sql, p_err, (ub4) 1, (ub4) 0,
    (CONST OCISnapshot *) NULL, (OCISnapshot *) NULL, OCI_DEFAULT);
    while (rc != OCI_NO_DATA) {             /* Fetch the remaining data */
    printf("%s\n",p_sli);
    rc = OCIStmtFetch(p_sql, p_err, 1, 0, 0);
    printf("After fetch\n");
    rc = OCILogoff(p_svc, p_err); /* Disconnect */
    rc = OCIHandleFree((dvoid *) p_sql, OCI_HTYPE_STMT); /* Free handles */
    rc = OCIHandleFree((dvoid *) p_svc, OCI_HTYPE_SVCCTX);
    rc = OCIHandleFree((dvoid *) p_err, OCI_HTYPE_ERROR);
    void main()
    OCIClass c1;
    getch();
    The above program works on my Windows desktop. If I try this in Solaris, OCILogon fails and gives an error. If I check the value of rc, I find that it is -2. I can connect to the database using SQLPlus, but not through the program. Not sure how to debug this...
    Any pointers ?
    Thanks in advance,
    mrk

    Did you make the required port entry in the /etc/services file? You will need to add the gateway service port there. Then try to run your program.
    T00th

  • Please give me some sample program releated BOM

    please give me some sample program releated BOM

    Hi,
    *& Module : PP                                                         |
    *& Application : The program loads the Bill of Material                |
    *&                                                                     |
    *| Modification Log                                                    |
    *| -
                                                        |
    *| Programmer                                                          |
    *|                                                       Change        |
    *| -
    |
    REPORT zpp0120 NO STANDARD PAGE HEADING
                                      MESSAGE-ID z0
                                      LINE-SIZE  132
                                      LINE-COUNT 65(2).
                         Internal Tables                                 *
    *Internal table for the BOM file.
    DATA: BEGIN OF i_bom OCCURS 0,
          matnr(18),
          werks(4),
          stlan(1),
          stlal(2),
          stktx(40),
          bmeng(16),
          menge(16),
          posnr(4),
          postp(1),
          meins(3),
          datuv(10),
          fmeng(1),
          idnrk(18),
          potx1(40),
          ausch(7),
          END OF i_bom.
    Extracting Document and Doc type for POSTP = D.
    DATA : BEGIN OF i_stpo OCCURS 1,
           doknr(25),
           dokar(3),
           posnr(4),
           stlnr LIKE mast-stlnr,
           END   OF i_stpo.
    Local work area
    DATA:  g_my_rec_in   LIKE i_bom.
    Declare internal table for Call Transaction and BDC Session
    DATA: i_bdc_table LIKE bdcdata OCCURS 0 WITH HEADER LINE.
                         Global Variables                                *
    DATA: g_counter(2) TYPE n,
          g_field_name(18) TYPE c,
          zc_yes  TYPE syftype VALUE 'X'.
                         Selection Screen                                *
    SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-001.
    PARAMETERS: p_fname1 TYPE localfile .
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-002.
    PARAMETERS: p_rloc1 AS CHECKBOX  DEFAULT 'X'.
    SELECTION-SCREEN BEGIN OF BLOCK c WITH FRAME TITLE text-005.
    PARAMETERS p_group(12) OBLIGATORY DEFAULT 'ZBOM'.
    SELECTION-SCREEN END OF BLOCK c.
    SELECTION-SCREEN END OF BLOCK b.
    SELECTION-SCREEN END OF BLOCK a.
    **WRITE the report header
    TOP-OF-PAGE.
      INCLUDE zheading.
                         Start of selection                              *
    START-OF-SELECTION.
    Load Input file
      PERFORM f_load_input_file.
    Create BDC records.
      PERFORM create_bdc_records .
    *&      Form  Create_BDC_records
          text:* perform the BDC for the records in the internal table
    -->  p1        text
    <--  p2        text
    FORM create_bdc_records .
      DATA: v_stlnr LIKE mast-stlnr.
      DATA: v_postp(1) VALUE 'D'.
      IF NOT i_bom[] IS INITIAL.
    Open BDC session
        PERFORM open_bdc_session.
        SORT i_bom BY matnr werks posnr.
        SELECT  SINGLE stlnr  INTO v_stlnr
        FROM mast
        WHERE    matnr = i_bom-matnr
         AND     werks = i_bom-werks.
        SELECT doknr dokar posnr stlnr
                    INTO TABLE i_stpo
                    FROM stpo
                    FOR ALL ENTRIES IN i_bom
                    WHERE postp = v_postp
                    AND   posnr = i_bom-posnr
                    AND   stlnr = v_stlnr.
        SORT i_stpo BY posnr stlnr.
        LOOP AT i_bom.
          g_my_rec_in = i_bom.
          READ TABLE i_stpo WITH KEY posnr = i_bom-posnr
                                     stlnr = v_stlnr
                                     BINARY SEARCH.
          AT NEW matnr.
            CLEAR i_bdc_table[].
            PERFORM insert_screen_header.
          ENDAT.
    Setting up counter for 20 line items
          IF g_counter = 20.
            g_counter = 1.
          ENDIF.
          PERFORM bdc_field  USING 'BDC_OKCODE'
                                        '/00'.
    *next screen
          PERFORM bdc_dynpro USING 'SAPLCSDI' '0140'.
          PERFORM bdc_field  USING 'BDC_CURSOR' 'RC29P-FMENG(01)'.
          PERFORM bdc_field  USING 'BDC_OKCODE' '/00'.
          CONCATENATE 'RC29P-POSNR('  g_counter  ')' INTO g_field_name.
          PERFORM bdc_field USING g_field_name i_bom-posnr.
          CONCATENATE 'RC29P-IDNRK('  g_counter  ')' INTO g_field_name.
          PERFORM bdc_field USING g_field_name i_bom-idnrk.
          CONCATENATE 'RC29P-MENGE('  g_counter  ')' INTO g_field_name.
          PERFORM bdc_field USING g_field_name i_bom-menge.
          CONCATENATE 'RC29P-MEINS('  g_counter  ')' INTO g_field_name.
          PERFORM bdc_field USING g_field_name i_bom-meins.
          CONCATENATE 'RC29P-POSTP('  g_counter  ')' INTO g_field_name.
          PERFORM bdc_field USING g_field_name i_bom-postp.
          CONCATENATE 'RC29P-FMENG('  g_counter  ')' INTO g_field_name.
          PERFORM bdc_field USING g_field_name i_bom-fmeng.
    *next screen
          PERFORM bdc_dynpro USING 'SAPLCSDI' '0130'.
          PERFORM bdc_field  USING 'BDC_OKCODE' '/00'.
    Check the Item category to direct the screen flow accordingly.
          CASE i_bom-postp.
            WHEN 'B'.
              PERFORM item_text_insert.
            WHEN 'Z'.
              PERFORM item_text_insert.
            WHEN 'T'.
              PERFORM item_text_insert.
            WHEN 'N'.
              PERFORM bdc_field   USING 'BDC_CURSOR' 'RC29P-AUSCH'.
              PERFORM bdc_field   USING 'RC29P-AUSCH' i_bom-ausch.
    next screen
              PERFORM item_text_insert.
    *next screen
              PERFORM bdc_dynpro  USING 'SAPLCSDI' '0133'.
              PERFORM bdc_field   USING 'BDC_OKCODE' '/00'.
              PERFORM bdc_field   USING 'RC29P-EKORG' ' '.
            WHEN 'D'.
              PERFORM bdc_field   USING 'RC29P-DOKNR' i_stpo-doknr.
              PERFORM bdc_field   USING 'RC29P-DOKAR' i_stpo-dokar.
    next screen
              PERFORM item_text_insert.
    When POSTP = X, L.
            WHEN OTHERS.
              PERFORM bdc_field   USING 'BDC_CURSOR' 'RC29P-AUSCH'.
              PERFORM bdc_field   USING 'RC29P-AUSCH' i_bom-ausch.
    next screen
              PERFORM item_text_insert.
          ENDCASE.
          g_counter = g_counter + 1.
    next screen
          PERFORM bdc_dynpro      USING 'SAPLCSDI' '0140'.
          PERFORM bdc_field       USING 'BDC_CURSOR' 'RC29P-POSNR(01)'.
          PERFORM bdc_field       USING 'BDC_OKCODE' '=FCBU'.
          AT END OF matnr.
            PERFORM insert_bdc_new.
          ENDAT.
        ENDLOOP.
        CLEAR i_bom[].
        PERFORM close_bdc_session.
    Release the BDC sessions created
        PERFORM release_bdc.
      ENDIF.
    ENDFORM.                    " open_group
    *&      Form  bdc_dynpro_start
          Initialize the screen
         -->P_G_PROGRAM_1
         -->P_G_SCREEN
    FORM bdc_dynpro USING    p_g_program_1
                                    p_g_screen.
      CLEAR i_bdc_table.
      i_bdc_table-program  = p_g_program_1.
      i_bdc_table-dynpro   = p_g_screen.
      i_bdc_table-dynbegin = 'X'.
      APPEND i_bdc_table.
    ENDFORM.                    " bdc_dynpro_start
    *&      Form  bdc_field
           Insert field                                                  *
    FORM bdc_field USING f_name f_value.
      CLEAR i_bdc_table.
      i_bdc_table-fnam = f_name.
      i_bdc_table-fval = f_value.
      APPEND i_bdc_table.
    ENDFORM.                    "bdc_insert_field
    *&      Form  open_bdc_session
         Open the BDC session
    FORM open_bdc_session .
    Open BDC session and creat and update condition records
      CALL FUNCTION 'BDC_OPEN_GROUP'
        EXPORTING
          client                    = sy-mandt
          DEST                      = FILLER8
          group                     = p_group
          HOLDDATE                  = FILLER8
          keep                      = 'X'
          user                      = sy-uname
          RECORD                    = FILLER1
          PROG                      = SY-CPROG
        IMPORTING
          QID                       =
    EXCEPTIONS
       client_invalid            = 1
       destination_invalid       = 2
       group_invalid             = 3
       group_is_locked           = 4
       holddate_invalid          = 5
       internal_error            = 6
       queue_error               = 7
       running                   = 8
       system_lock_error         = 9
       user_invalid              = 10
       OTHERS                    = 11
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " create_bdc_session
    *&      Form  insert_screen_header
          Insert the Header data into the screens
    FORM insert_screen_header .
      g_counter = 1.
      PERFORM bdc_dynpro USING 'SAPLCSDI' '0100'.
      PERFORM bdc_field  USING 'BDC_CURSOR' 'RC29N-STLAL'.
      PERFORM bdc_field  USING 'BDC_OKCODE' '/00'.
      PERFORM bdc_field  USING 'RC29N-MATNR' g_my_rec_in-matnr.
      PERFORM bdc_field  USING 'RC29N-WERKS' g_my_rec_in-werks.
      PERFORM bdc_field  USING 'RC29N-STLAN' g_my_rec_in-stlan.
      PERFORM bdc_field  USING 'RC29N-STLAL' g_my_rec_in-stlal.
      PERFORM bdc_field  USING 'RC29N-DATUV' g_my_rec_in-datuv.
    next screen
      PERFORM bdc_dynpro USING 'SAPLCSDI' '0110'.
      PERFORM bdc_field  USING 'BDC_CURSOR' 'RC29K-BMENG'.
      PERFORM bdc_field  USING 'BDC_OKCODE' '/00'.
      PERFORM bdc_field  USING 'RC29K-STKTX' g_my_rec_in-stktx.
      PERFORM bdc_field  USING 'RC29K-BMENG' g_my_rec_in-bmeng.
    *next screen
      PERFORM bdc_dynpro USING 'SAPLCSDI' '0111'.
      PERFORM bdc_field  USING 'BDC_CURSOR' 'RC29K-LABOR'.
    ENDFORM.                    " insert_screen_header
    *&      Form  insert_bdc
         Insert the BDC session
    FORM insert_bdc_new .
      CALL FUNCTION 'BDC_INSERT'
         EXPORTING
           tcode                  = 'CS01'
          POST_LOCAL             = NOVBLOCAL
          PRINTING               = NOPRINT
          SIMUBATCH              = ' '
          CTUPARAMS              = ' '
         TABLES
           dynprotab              = i_bdc_table
      EXCEPTIONS
        internal_error         = 1
        not_open               = 2
        queue_error            = 3
        tcode_invalid          = 4
        printing_invalid       = 5
        posting_invalid        = 6
        OTHERS                 = 7
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      CLEAR i_bdc_table[].
    ENDFORM.                    " insert_bdc
    *&      Form  close_bdc_session
          Close the BDC session
    FORM close_bdc_session .
      CALL FUNCTION 'BDC_CLOSE_GROUP'
           EXCEPTIONS
                not_open    = 1
                queue_error = 2
                OTHERS      = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " close_bdc_session
    *&      Form  f_load_input_file
         Load the file into the Internal table
    FORM f_load_input_file.
      IF p_rloc1 = zc_yes.
        CALL FUNCTION 'WS_UPLOAD'
             EXPORTING
                  filename                = p_fname1
                  filetype                = 'DAT'
             TABLES
                  data_tab                = i_bom
             EXCEPTIONS
                  conversion_error        = 1
                  file_open_error         = 2
                  file_read_error         = 3
                  invalid_type            = 4
                  no_batch                = 5
                  unknown_error           = 6
                  invalid_table_width     = 7
                  gui_refuse_filetransfer = 8
                  customer_error          = 9
                  OTHERS                  = 10.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          STOP.
        ENDIF.
      ENDIF.
    ENDFORM.                    " f_load_input_file
    *&      Form  release_bdc
         Release BDC session
    FORM release_bdc.
      SUBMIT rsbdcsub WITH mappe EQ p_group
                      WITH von EQ sy-datum
                      WITH bis EQ sy-datum
                      WITH fehler EQ '.'
                      EXPORTING LIST TO MEMORY
                      AND RETURN.
    ENDFORM.                    " release_bdc
    *&      Form  item_text_insert
          Repetitive code in the screen flow
    FORM item_text_insert.
      PERFORM bdc_dynpro USING 'SAPLCSDI' '0131'.
      PERFORM bdc_field  USING 'BDC_OKCODE' '/00'.
      PERFORM bdc_field  USING 'BDC_CURSOR' 'RC29P-POTX1'.
      PERFORM bdc_field  USING 'RC29P-POTX1' i_bom-potx1.
    ENDFORM.                    " item_text_insert

  • My Mac HD says that I have Quicktime Software, all that I find in my applications is Quicktime Player. And I cannot unlock Quicktime Pro in this program through its preferences.. help?

    My Mac HD says that I have Quicktime Software, all that I find in my applications is Quicktime Player. And I cannot unlock Quicktime Pro in this program through its preferences.. help?

    http://support.apple.com/kb/DL923?viewlocale=en_US&locale=en_US
    Install and register this version. It installs in the Utilities folder.

  • Why do SQL sample programs work when there is no entry for the data sources in the ODBC Data Source Administrator that are used by the sample program?

    Hi,
    I am trying to understand how to access an SQL database from CVI.  
    I don't understand how the sample programs shipped with the toolkit can access the database they use if it is not listed in the ODBC Data Source Administrator.
    In the code, I see the line:
    hdbc = DBConnect ("DSN=CVI SQL Samples");
    However, there is not an entry that I can find in the ODBC Administrator for "CVI SQL Samples."
    The SQL help suggests there should be a User DSN named, "CVI32_Samples", but I don't see that entry in the ODBC Administrator on my win-7 system.
    I believe the sample program is accessing a database file named, "C:\Users\Public\Documents\National Instruments\CVI\Samples\sql\samples.mdb".
    Exactly how is the call to DBConnect() translated to the file, "samples.MDB", if there is no entry in the ODBC Administrator?
    Regards,
    Mark 

    I figured it out.  There is a 32 bit ODBC administrator and a 64 bit ODBC administrator.  The ODBC administrator I run through the control panel is the 64 bit ODBC administrator. To access the 32 bit administrator I need to run, "C:\Windows\SysWOW64\odbcad32.exe".
    I am running the samples in 32 bit mode, so I need to use the 32 bit ODBC administrator.
    Best,
    Mark

  • HR Technical : Sample program to check if PERNR is changed PART TIME.

    Hi Guys,
    I will appreciate if somebody can give me the sample program / subroutine to check if a PERNR has been converted from FULL TIME to PART TIME using PERSK.
    Thanks

    HI,  Use P0001-PERSG employee group to identify whether permenant or temporary etc. You can compare current value and previous value. Also you can check the action for demotion in P0000.

  • Can any one please send me sample programs using java mapping..

    <b>Can any one please send me sample programs using java mapping with input and output?</b>
    please let me know how to get started with java mapping?
    Prerequisites for java mapping ?
    What are the jars need to be deployed for SAX,DOM.  And how to do it in NWDS?
    Use of Execute() and setparameter() ... StreamTransformation?
    Some sample program using java mapping with simple logic(input and output)?

    Hi,
    Did you go thro these blogs?
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii
    Nice blogs to start Java Mapping.
    Go thro this one too.
    /people/stefan.grube/blog/2006/10/23/testing-and-debugging-java-mapping-in-developer-studio
    Regards,
    P.Venkat
    Message was edited by:
            Venkataramanan

  • ODM Sample Program Run Time Errors

    I try to run Data Mining Sample programs against Oracle Sample schema data.
    When run Java Programs, (in all algorithms) following Exception occur when build model :
    --- Build Model - using cost matrix ---
    treeBuildTask_jdm is started, please wait. javax.datamining.JDMException: Generic Error.
    at oracle.dmt.jdm.resource.OraExceptionHandler.createException(OraExceptionHandler.java:142)
    at oracle.dmt.jdm.resource.OraExceptionHandler.createException(OraExceptionHandler.java:91)
    at oracle.dmt.jdm.OraDMObject.createException(OraDMObject.java:111)
    at oracle.dmt.jdm.OraExecutionHandle.waitForCompletion(OraExecutionHandle.java:232)
    at com.cbc.mytest.dmsConn.executeTask(dmsConn.java:229)
    at com.cbc.mytest.dmsConn.buildModel(dmsConn.java:200)
    at com.cbc.mytest.dmsConn.main(dmsConn.java:142)
    Caused by: java.sql.SQLException: Conversion to String failed
    at oracle.sql.Datum.stringValue(Datum.java:172)
    at oracle.dmt.jdm.scheduler.OraJobInfo.getExecutionDuration(OraJobInfo.java:235)
    at oracle.dmt.jdm.scheduler.OraJobInfo.updateJobInfo(OraJobInfo.java:168)
    at oracle.dmt.jdm.scheduler.OraJob.waitForCompletion(OraJob.java:139)
    at oracle.dmt.jdm.OraExecutionHandle.waitForCompletion(OraExecutionHandle.java:227)
    ... 3 more
    When run sql scripts following error occur when build model:
    SQL> -- Build a DT model
    SQL> BEGIN
    2 DBMS_DATA_MINING.CREATE_MODEL(
    3 model_name => 'DT_SH_Clas_sample',
    4 mining_function => dbms_data_mining.classification,
    5 data_table_name => 'mining_data_build_v',
    6 case_id_column_name => 'cust_id',
    7 target_column_name => 'affinity_card',
    8 settings_table_name => 'dt_sh_sample_settings');
    9 END;
    10 /
    BEGIN
    ERROR at line 1:
    ORA-00942: table or view does not exist
    ORA-06512: at "DMSYS.DBMS_DATA_MINING", line 305
    ORA-06512: at line 2
    Wonder if these two appeard different errors are actually related.
    Model Build against the same data in Data Miner are fine. So that make me think Data and data type is fine. Is runtime environment needed to set in certain way???
    Please give me your valuable input in which direction to look for solutions.
    Thank you so much!
    Zhene
    Our system setting:
    Database: 10g R2 Oracle Database with OLAP, DM options.
    schema SH installed,
    Jdk 1.4.2.

    Good Morning! Xiafang,
    I just talked to our DBA, he send a the information you asked for. Please let me know if you have any suggestions.
    Thanks,
    Zhene
    Our DBA's e-mail:
    I gave dmuser everything that I normally give to myself. It has the following:
    grant sysdba,dba,connect,resource,select any dictionary to dmuser;
    This should remove privileges as an issue.
    If you execute a profile in /opt/app/oracle called .profile10 you get the following environment. Maybe you can copy .profile10 to your unix logins home directory and execute it : . ./.profile10
    PATH=./:/usr/java1.2/bin:/opt/app/oracle/product/10.2.0.1/bin:./:/usr/bin::/usr//bin:/opt/app/oracle/product/9.2/bin:/opt/SUNWspro/bin:/usr/local/bin:/usr/ucb:/usr/java1.2/bin:/opt/app/oracle/product/9.2/bin:/opt/SUNWspro/bin:/usr/local/bin:/usr/ucb
    ORACLE_BASE=/opt/app/oracle
    JAVA_PATH=/usr/j2se/bin:/usr/j2se/include:/opt/app/bea/tuxedo8.0/bin
    TUXDIR=/opt/app/bea/tuxedo8.0
    ORACLE_PATH=/opt/app/oracle/product/9.2/bin
    ORACLE_SID=OLAPDM
    DBHOST=kenny
    PS1=^[[5mkenny%oracle:$ORACLE_SID:$PWD> ${e}[0m
    ORACLE_LIBRARY_PATH=/opt/app/oracle/product/9.2/lib32:/opt/app/oracle/product/9.2/lib
    JAVA_LIBRARY_PATH=/usr/j2se/lib:/usr/j2se/jre/lib/sparc
    JAVA_VERSION=java1.2
    LD_LIBRARY_PATH=/usr/lib/:/opt/app/oracle/product/10.2.0.1/lib:/opt/app/oracle/product/10.2.0.1/rdbms/lib:/opt/openv/netbackup/bin
    JAVA_SUFFIX1=12
    ORACLE_HOME=/opt/app/oracle/product/10.2.0.1
    Don

Maybe you are looking for

  • How did I get an album cover 17 times when downloading music from itunes to my ipod and how do I get rid of the duplicates?

    I am pretty new to an ipod.  I finally got itunes on my computer, was able to download from computer to ipod classic,  but somehow ended up with 2 album covers showing 17 times for one and 16 times for the other.  I really don't have a clue how this

  • BPM 7.3 basis setup - deploy error

    Hi guys, I`m a PI developer and quite new to SAP BPM, only took part in the SAP training several months ago. Now the installed a BPM 7.3 system and I`m trying to implement some processes starting with the sample of the training. I created a RuleSet a

  • Problm while saving the Program in se38

    Hi wn try to save the program im getting this following message how to overcome of this problm? System setting does not allow changes to be made to object PROG Y_VENADD Regards Smitha

  • Site Meter Issue on Safari, Firefox and Opera

    Hi - Sorry if this should actually be a OS X question, but since it's a browser issue I thought this might be the place. I have several blogs that have Site Meter on them. When I view the blogs, the Site Meter "bugs" do not appear. When I try to acce

  • Mail will not delete any messages

    I have a 10.5.6 server running my mail services. I have a 10.5.6 client checking it. I currently have over 4,000 messages in my inbox and they all get downloaded when I check my mail. If I go to the account preferences in Mail.app and tell it to dele