SP creation

Hi all,
I need your help in creating a stored procedure. Since I've not used PL SQL in years, it seems to be complicated to me now.. I would appreciate any kind of help.
I created a table called auditing. This table needs to be inserted/updated via the SP by comparing/evaluating with another table acfg. Data in acfg will be entered by the users. Sample Data of acfg table:
ID     Mand     Bcode     Skey     I_O     Tname     Cname                     Func      Group_col1        WhereSQL           Message
1     M1     P1     1     O     Table1     COUNTRY                     COUNT        COUNTRY                      %1 entries found for  %2
2     M1     P1     2     O     Table1     FIRSTNAME               COUNT                                  %1 total lines
3     M1     P2     1     I     Table1     FIRSTNAME             COUNT                                   %1 lines found
SQL>desc auditing;
Name                       Null?                              Type
ID                     NOT NULL                         NUMBER(5)
CDATE                                               DATE
CCODE                                           VARCHAR2(10)             
CTERM                                            VARCHAR2(255)
PID                                            NUMBER(20)                 
MAND                                           VARCHAR2(10)             
SKEY                                            NUMBER(10)
MESSAGE                                      VARCHAR2(2000)         
SOURCE                                               VARCHAR2(255)
SOURCE_YN                                        VARCHAR2(1)The stored procedure auditingsp will be called with these input parameters (pid, mand, bcode, opp, I_O, source).
*1*. SP should insert record into auditing table.
*2.* If acfg.v_yn is ‘Y’ (compare with mand=acfg.mand, bcode=acfg.bcode) following logic should be used:
SP should generate a dynamic sql from the a.cfg table
select func(column_name) from tname where mand=’…’ (If I_O=’I’)
select func(column_name) from tname where mand=’…’ and pid=’…’ (If I_O = ‘O’)
So, query for the 1st record in acfg table should be select count(country) from table1 where mand=’M1’ and pid=’..’ group by country;
Note: group_col1, group_col2, group_col3 are optional. But should be considered in the select query when NOT NULL.
*3.* The output of the above query should be written to auditing.message field by filling in the result of the above query in the acfg.message field.
In this example, acfg.message has this value: %1 entries found for %2. So %1 and %2 should be filled in from the output of the above query. The auditing.message should have this
value 20 entries found for Germany.
For the acfg table above, the auditing table should be inserted/updated like this:
ID     Cdate                            Ccode           Pid     Mand     Skey     Message
1     01.04.2009 08:30:00              P1          12345     M1     1     20 entries found for Germany
2     01.04.2009 08:30:01              P1          12345     M1     2     10 entries found for USA
3     01.04.2009 08:30:02              P1          12345     M1     3     2  entries found for Denmark
4     01.04.2009 08:30:03              P1          12345     M1     4     32 total lines
5     01.04.2009 08:31:00              P2          12346     M1     1     32 lines found*4.*     Also, skey in auditing table should be assigned for every I or O call based on mand and bcode in the SP.
Please give me your suggestions on this for steps 2,3 and 4.. I'm not sure if I need to use cursors for step 2 & 3.
CREATE OR REPLACE procedure PUBS.auditingsp (pid IN number, mand IN varchar2, bcode IN varchar2, opp IN number, source IN varchar2)
IS
BEGIN
declare
seqno number(38);
begin
select audseq.nextval into seqno from dual ;
   insert into auditing (ID,cdate,pid,mand,source)
    values(seqno,sysdate,pid,mand,source);
/* steps 2,3,4 */
end;
end auditingsp;
/Thanks a lot for all your help
Edited by: newbiegal on Jul 6, 2009 2:07 PM
Edited by: newbiegal on Jul 6, 2009 2:10 PM
Edited by: newbiegal on Jul 7, 2009 11:53 AM

I've created the procedure like Frank suggested.. The procedure runs fine without the if else conditions..
Stored procedure is created for auditing records in the batch tables. Batch process calls the Stord procedure at the beginning of the batch with 'i' parameter(Only the acfg.i_o='i' records should be audited) and the batch calls the stored procedure with 'o' parameter at the end of the batch(Only the acfg.i_o='o' records should be written to the auditing table. So, the stored procedure writes the message(by evaluating with acfg table) into the auditing table pre batch and post batch. There will be 2 conditions in the procedure:
1. Only if acfg.v_yn ='Y', record should be inserted into auditing table. if acfg.v_yn ='N', data should be ignored.
2. Read the records in acfg table(cursor aud_cur in the Stored procedure) order by mand,bcode,i_o,skey.
3. If pi_i_o = 'i' then
a. Build sql evaluating the records in acfg table like
select func(cname) from tname where mand = pi_mand and
wheresql ='..' group by group_col1,group_col2,
group_col3 /* wheresql should be considered when there
is a where clause in tname for example if there is an
expression customer=3 in the wheresql. group_col1,
group_col2, group_col3 should also be considered when
there is an expression. */
b. Execute the sql, fetch the output in acfg.message and
insert the message into auditing.message field
4. If pi_i_o= 'o' then
a. Build sql evaluating the records in acfg table like
select func(cname) from tname where mand = pi_mand and
pid = pi_pid wheresql ='..' group by group_col1,
group_col2,group_col3 /* wheresql should be considered
when there is a where clause in tname for example if
there is an expression customer=3 in the wheresql.
group_col1,group_col2, group_col3 should also be
considered when there is an expression. */
b. Execute the sql, fetch the output in acfg.message and
insert the message into auditing.message field.
I created this procedure below, it works but when I try with the condition for 'i' and 'o' parameters it doesnt work..
create table auditing (
     id number(5) not null,
     cdate date,
     ccode varchar2(10),
     cterm varchar2(255),
     pid number(20),
     mand varchar2(10),
     skey number(10),
     message varchar2(2000),
     source varchar2(255),
     source_YN varchar2(1)
create table acfg (
     id number(10) not null,
     v_YN varchar2(1),
     mand varchar2(10),
     bcode varchar2(10),
     skey number(10),
     i_o varchar2(3),
     tname varchar2(255),
     cname varchar2(255),
     func varchar2(64),
     group_col1 varchar2(255),
     group_col2 varchar2(255),
     group_col3 varchar2(255),
     message_id number(10),
     wheresql varchar2(2000),
     message varchar2(2000)
insert into acfg (id,mand,bcode,skey,i_o,tname,cname,func,group_col1,message)
values (1,'M1','P1',1,'o','table1','country','count','country','%1 entries found for %2');
insert into acfg (id,mand,bcode,skey,i_o,tname,cname,func,message)
values (2,'M1','P1',2,'o','table1','firstname','count','%1 total lines');
insert into acfg (id,mand,bcode,skey,i_o,tname,cname,func,message)
values (3,'M1','P2',1,'i','table1','firstname','count','%1 lines found');
create table table1
         (country   varchar2(30),
          firstname varchar2(30),
          mand      varchar2(10),
          pid       number(20)
CREATE SEQUENCE audseq
     MINVALUE 1
        MAXVALUE 999999999999999999999999999
       START WITH 1
        INCREMENT BY 1
        CACHE 2;
CREATE OR REPLACE PROCEDURE auditingsp
      ( pi_pid    IN auditing.pid%TYPE
      , pi_mand   IN acfg.mand%TYPE
      , pi_bcode  IN acfg.bcode%TYPE
      , pi_opp    IN NUMBER
      , pi_i_o    IN acfg.i_o%TYPE
      , pi_source IN auditing.source%TYPE )
     AS
      CURSOR aud_cur IS
        SELECT *
        FROM     acfg
        WHERE    mand = pi_mand
                 AND bcode = pi_bcode
                 AND ((UPPER (pi_I_O) = 'I')
                 OR (UPPER (pi_I_O) = 'O'))
                 ORDER  BY skey;
     TYPE acfg_tab IS TABLE OF aud_cur%ROWTYPE;
     acfg_array     acfg_tab;
     i_sql          VARCHAR2 (32767);
     c1          SYS_REFCURSOR;
     v_num          NUMBER;
     v_col          VARCHAR2 (30);
     BEGIN
     OPEN aud_cur;
     LOOP
         FETCH aud_cur BULK COLLECT INTO acfg_array LIMIT 1000;
         EXIT WHEN acfg_array.COUNT = 0;
         FOR i IN 1 .. acfg_array.COUNT LOOP
           i_sql :=
                'SELECT ' || acfg_array(i).func || '(*) num, '
                      || acfg_array(i).cname || ' col'
             ||   ' FROM ' || acfg_array(i).tname
             ||   ' WHERE mand = :pi_mand'
            ||   ' AND ' || NVL (acfg_array(i).wheresql, '1=1')
             ||   ' GROUP BY ' || acfg_array(i).cname
             ||   ' ORDER BY num DESC';
           OPEN c1 FOR i_sql USING pi_mand;
          LOOP
             FETCH c1 INTO v_num, v_col;
             EXIT WHEN c1%NOTFOUND;
             INSERT INTO auditing
               (id, cdate, ccode, pid, mand, skey, source, message)
             SELECT audseq.NEXTVAL, SYSDATE, acfg_array(i).bcode, pi_pid,
                 acfg_array(i).mand, acfg_array(i).skey, pi_source,
                REPLACE (REPLACE (acfg_array(i).message, '%1', v_num), '%2', v_col)
            FROM   DUAL;
           END LOOP;
           CLOSE c1;
         END LOOP;
    END LOOP;
     CLOSE aud_cur;
END auditingsp;
SQL>EXEC auditingsp (12345, 'M1', 'P1', 0, 'i', 'source1')
PL/SQL procedure successfully completed.
SQL>SELECT id, cdate, ccode, pid, mand, skey, message  FROM   auditing;
        ID CDATE     CCODE             PID MAND       SKEY MESSAGE
         1 09-JUL-09 P1              12345 M1            1 20 entries found for Germany
         2 09-JUL-09 P1              12345 M1            1 10 entries found for USA
         3 09-JUL-09 P1              12345 M1            1 2 entries found for Denmark
         4 09-JUL-09 P2              12345 M1            1 32 lines found
         5 09-JUL-09 P1              12345 M1            2 32 total linesBut the sort key needs to be assigned in a sequence for every ccode,pid and mand. Like:
  ID CDATE     CCODE             PID MAND       SKEY MESSAGE
         1 09-JUL-09 P1              12345 M1            1 20 entries found for Germany
         2 09-JUL-09 P1              12345 M1            2 10 entries found for USA
         3 09-JUL-09 P1              12345 M1            3 2 entries found for Denmark
         4 09-JUL-09 P2              12345 M1            4 32 lines found
         5 09-JUL-09 P1              12345 M1            2 32 total linesI tried the below procedure with if else clauses with the conditions 'i' and 'o' parameters,
SQL>   CREATE OR REPLACE PROCEDURE auditingsp
  2    ( pi_pid    IN auditing.pid%TYPE
  3    , pi_mand   IN acfg.mand%TYPE
  4    , pi_bcode  IN acfg.bcode%TYPE
  5    , pi_opp    IN NUMBER
  6    , pi_i_o    IN acfg.i_o%TYPE
  7    , pi_source IN auditing.source%TYPE )
  8  AS
  9    CURSOR aud_cur IS
10        SELECT *
11        FROM     acfg
12        WHERE     mand = pi_mand
13        AND bcode = pi_bcode                                              /* added */
14         AND     ((UPPER (pi_I_O) = 'I')
15        OR     (UPPER (pi_I_O) = 'O'))
16        ORDER     BY skey;
17    TYPE acfg_tab IS TABLE OF aud_cur%ROWTYPE;
18    acfg_array     acfg_tab;
19    i_sql          VARCHAR2 (32767);
20    o_sql          VARCHAR2 (32767);                                    /* added */
21    c1          SYS_REFCURSOR;
22    v_num          NUMBER;
23    v_col          VARCHAR2 (30);
24  BEGIN
25   OPEN aud_cur;
26   LOOP
27      FETCH aud_cur BULK COLLECT INTO acfg_array LIMIT 1000;
28      EXIT WHEN acfg_array.COUNT = 0;        
29   If upper(acfg_array(i).v_yn) = 'Y'  THEN                                         /* added */
30     If UPPER (pi_i_o) = 'I' THEN                                                  /* added */
31       FOR i IN 1 .. acfg_array.COUNT LOOP
32         i_sql :=
33               'SELECT ' || acfg_array(i).func || '(*) num, '
34                     || acfg_array(i).cname || ' col'
35           ||   ' FROM ' || acfg_array(i).tname
36            ||   ' WHERE mand = :pi_mand'
37           ||   ' AND ' || NVL (acfg_array(i).wheresql, '1=1')
38            ||   ' GROUP BY ' || acfg_array(i).cname
39            ||   ' ORDER BY num DESC';
40          OPEN c1 FOR i_sql USING pi_mand;
41         LOOP
42          FETCH c1 INTO v_num, v_col;
43            EXIT WHEN c1%NOTFOUND;
44           INSERT INTO auditing
45              (id, cdate, ccode, pid, mand, skey, source, message)
46            SELECT audseq.NEXTVAL, SYSDATE, acfg_array(i).bcode, pi_pid,
47                acfg_array(i).mand, acfg_array(i).skey, pi_source,
48               REPLACE (REPLACE (acfg_array(i).message, '%1', v_num), '%2', v_col)
49            FROM   DUAL;
50           END LOOP;
51           CLOSE c1;
52       END LOOP;
53     ELSIF UPPER (pi_i_o) = 'O'  THEN                                                 /* added */
54      FOR i IN 1 .. acfg_array.COUNT LOOP                                          /* added */
55           o_sql :=
56               'SELECT ' || acfg_array(i).func || '(*) num, '
57                     || acfg_array(i).cname || ' col'
58           ||   ' FROM ' || acfg_array(i).tname
59            ||   ' WHERE mand = :pi_mand'
60          ||   ' AND ' || 'pid = :pi_pid'                                            /* added */
62           ||   ' AND ' || NVL (acfg_array(i).wheresql, '1=1')
63            ||   ' GROUP BY ' || acfg_array(i).cname
64            ||   ' ORDER BY num DESC';
65          OPEN c1 FOR o_sql USING pi_mand, pi_pid;
66         LOOP
67          FETCH c1 INTO v_num, v_col;
68            EXIT WHEN c1%NOTFOUND;
69            INSERT INTO auditing
70              (id, cdate, ccode, pid, mand, skey, source, message)
71            SELECT audseq.NEXTVAL, SYSDATE, acfg_array(i).bcode, pi_pid,
72                acfg_array(i).mand, acfg_array(i).skey, pi_source,
73               REPLACE (REPLACE (acfg_array(i).message, '%1', v_num), '%2', v_col)
74           FROM   DUAL;
75           END LOOP;
76           CLOSE c1;
77       END LOOP;
78     ELSIF  upper(acfg_array(i).v_yn) = 'N'  THEN   
79     dbms_output.put_line('Data is ignored');
80     END if;
81 END if;
82 END LOOP;
83 CLOSE aud_cur;
84 END auditingsp;
I'm getting this error: PROCEDURE AUDITINGSP
On line:  30
PLS-00201: identifier 'I' must be declared
Line 30 if pi_i_o = 'I' is from the argument passed to the procedure, do I still have to declare it?
Please help me, thanks very much for your support.
Edited by: newbiegal on Jul 9, 2009 11:10 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Fields in Creation of free goods VBN1

    hi everybody,
    Can somebody expalin in detail the fields in creation of free goods(T-vbn1) like free goods quantity,additional quantity,documnet quantity and calculation rule....
    <b>Please dont copy paste anything form SAP help....I read that one......</b>
    I would appreciate if u explain with your sentence..
    Will reward point if it helps.
    Ghassan

    Hi Gafoor,
    Material
    Material, for which free goods is to be
    granted
    Minimum quantity
    Minimum quantity for which free
    goods can be granted
    From
    Quantity of sales material
    FGQ--- Quantity unit of free goods material
    Free goods -- Quantity of free goods with reference to the quantity and quantity unit of the sales material.
    AQU - Quantity unit of the free goods additional quantity
    Rule - Calculation rule
    Prorata
    whole units
    unit related
    D -- Delivery controlling -  it tells how you can manage the delivery of free goods with respect to the main item ordered.
    Additional material -  Additional material (only available for entry in exclusive free goods)
    Hope it helps. Please reward if helpful.
    Thanks & Regards
    Sadhu Kishore

  • Account determination error - in creation of invoice

    Hello experts,
    i have an error in creation of invoice, after( pgi post goods issue)
    will you please help me out to solve this error.
    thanks & Regards,
    yogesh raina

    hello sir,
    After going throuth this path it shows no gl account in account determination chart
    as below
    Condition type     Message     Description
      ZPR0                                  123     Access KOFI not carried out (initialized field)
    Access     Message     Description
    10     123     Access KOFI not carried out (initialized field)
    20     121     No G/L account found in Account determination type KOFI
    30     123     Access KOFI not carried out (initialized field)
    40     121     No G/L account found in Account determination type KOFI
    50     121     No G/L account found in Account determination type KOFI
    60     123     Access KOFI not carried out (initialized field)

  • Automatic PO creation of free text PR

    Hi!
    We have all our PRs in free text since we are not yet using material master. One of our purchase organization will only order from one vendor and they will enter that vendor and price in the PR. Is it possible to create a PO automatically from that PR without a material or source list?
    Sincerely
    Anders

    Hi
    Thank you very much. Is it possible to restrict the automatic creation to a certain purchase organization?
    If I understand you right:
    1) Create PR with item category D Service
    2) Activate automatic PO creation in ML91
    That will create POs for all PRs created as a service?
    Sincerely
    Anders

  • Issue in creation of plant related data at receiving server using BD10

    Hi all,
    This is regarding Material master creation using B10.I am using MATMAS05 message type for sending data from one system to another.Data is sent and received successfully.When i go in mm03 i can see all the views created successfully accept views related to PLANT.Please guide to resolve the issue.
    When i entered into Log-
    1)"The field MBEW-BKLAS is defined as a required field; it does not contain an entry".
    2)"No material master data exists for material AB_08.04.09(30) in plant 4001".
    My segemnt is as follows-
    ZMATMAS05                      matmas05
           E1MARAM                        Master material general data (MARA)
               Z1KLART                        KLART----
    My extention
               E1MARA1                        Additional Fields for E1MARAM
               E1MAKTM                        Master material short texts (MAKT)
               E1MARCM                        Master material C segment (MARC)
                   Z1AUSPM                        E1AUSPMDistribution of Classification:----
    My extention
                   E1MARC1                        Additional Fields for E1MARCM
                   E1MARDM                        Master material warehouse/batch segment (MARD)
                   E1MFHMM                        Master material production resource/tool (MFHM)
                   E1MPGDM                        Master material product group
                   E1MPOPM                        Master material forecast parameter
                   E1MPRWM                        Master material forecast value
                   E1MVEGM                        Master material total consumption
                   E1MVEUM                        Master material unplanned consumption
                   E1MKALM                        Master material production version
               E1MARMM                        Master material units of measure (MARM)
               E1MBEWM                        Master material material valuation (MBEW)
               E1MLGNM                        Master material material data per warehouse number (MLGN)
               E1MVKEM                        Master material sales data (MVKE)
               E1MLANM                        Master material tax classification (MLAN)
               E1MTXHM                        Master material long text header
               E1CUCFG                        CU: Configuration data
           E1UPSLINK                      Reference from Object to Superior UPS
    Thanks.
    Edited by: sanu debu on Apr 27, 2009 7:10 PM

    CREATE CONTROLFILE SET DATABASE "NEWDB" NORESETLOGS ARCHIVELOGAlso when you are setting a new database, the option should be RESETLOGS and not NORESETLOGS.
    'D:\APP\ADMINISTRATOR\ORADATA\NEWDB\ONLINELOG\O1_MF_2_7FK0XKB8_.LOG
    D:\APP\ADMINISTRATOR\ORADATA\NEWDB\DATAFILE\O1_MF_SYSTEM_7FK0SKN0_.DBFWhy underscore(_) at the end of the datafile name. Any specific reason ?

  • Issue in Creation of new Value Field in CO-PA

    Hi,
    I have a query in CO-PA Value Field Linking.
    In my Development Client,
    1. Created a New Value Field (No Transport Request Generated)
    2. Linked to the above to new Conditon type created in SD. (Tranport request was generated) i.e. in Flow of Actual Values->Transfer of Billing Documents->Assign Value Fields
    However then i try creating a new Value Field in my Production Client it throws a message 'You have no authorization to change Fields".
    Is this an issue with authorization or i need to transport the Value field too from Development to Production client.
    Please Advise.
    Thanks in Advance,
    Safi

    Thanks Phaneendra for the response.
    The creation of Value field did not create any tranportation request. Will this too be transported if i transport the Operating Concern.
    Please Advise.
    Thanks,
    Safi

  • Issue in creation of control cycle

    Dear Gurus,
    During creation of control cycle (LPK1), the fields for source information is not appearing in my system.
    I compared control cycle in a different ECC system where source information is appearing.
    How can make the screen appear in my ECC system.
    Please find the screenshots.
    Any pointers will be highly appreciated.
    This thread is further to the threads in Production Planning and LE/WM Forum. I could not resolve the issue with the threads.
    Hope that I will get any pointer in EWM forum.
    http://scn.sap.com/thread/3609441
    http://scn.sap.com/thread/3610822
    With Regards,
    Malay

    Hello Malay,
    Can first contact your ABAPer and ensure the bottom screen is not an Screen Enhancement?
    If it is a some custom development, your ABAPer can help you on the logic behind it.
    Else, Let us know.
    Regards,
    Sathish

  • Issue in Creation of XML file from ABAP data

    Hi,
    I need to create a XML file, but am not facing some issues in creation of XML file, the in the required format.
    The required format is
    -<Header1 1st field= u201CValueu201D 2nd field= u201CValueu201D>
       - <Header2 1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 10 fields>
              <Header3 1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 6 fields/>
              <Header4  1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 4 fields/.>
               <Header5 1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 6 fields/>
          </Header2>
       </Header1>
    Iu2019m using the call transformation to convert ABAP data to XML file.
    So please anybody can help how to define XML structure in transaction XSLT_TOOL.
    And one more thing, here I need to put the condition to display the Header 3, Header 4, Header 5 values. If there is no record for a particular line item in header 3, 4 & 5, I donu2019t want to display full line items; this is only for Header 3, 4 & 5.
    Please help me in this to get it resolved.

    Hello,
    you can use CALL TRANSFORMATION id, which will create a exact "print" of the ABAP data into the XML.
    If you need to change the structure of XML, you can alter your ABAP structure to match the requirements.
    Of course you can create your own XSLT but that is not that easy to describe and nobody will do that for you around here. If you would like to start with XSLT, you´d better start the search.
    Regards Otto

  • What are the mandatory fields while creation of material master in differen

    what are the mandatory fields while creation of material master in different views?

    Hi Gopi,
      This is purely depends on the function configuration, which would be done MM consultants.  Kindly check with them.
    thanks & regards
    Kishore Kumar Maram

  • BADI for changing fields during Creation of BP in CRM

    Hello to everyone,
      I need to find a BADI (or other way) to default several fields during BP creation in CRM (4.0 SR1 SP9). The fields I will like to set are TAX TYPE, TAX NUMBER, TAX CATEGORY, etc.. I have found the BADI BUPA_TAX_UPDATE but i dont see any suitable parameters (structures) to changes these fields. Please advice and thanks in advance.

    Hi
    If you use function BUPA_NUMBERS_GET then your BP number will already be buffered and you can avoid a DB read. It may also be that the BP is not in the DB yet anyway.
    You can only pass one GUID in at a time - loop through IT_CHANGED_INSTANCES into a variable of type BU_PARTNER_GUID and pass that into the function as input parameter IV_PARTNER_GUID.
    Cheers
    Dom

  • Error in creation of purchase materials/Goods receipt against PO(FI-MM)

    Hi All,
    While processing FI - MM integration iam facing below errors,request to guide me with same
    1) While creation of purchase materials
    Valuation class 7920 not allowed for material type Raw material Message no. M3180
    Diagnosis
    The combination of values you have entered is not defined in the system.
    Procedure
    Check your entries, and choose a valid value or combination of values with F4.
    I have crossed checked in t code OMSK valuation class 7920 exists.
    2) Goods receipt against PO:
    Number range for trans./event type WE in year 2014 does not exist Message no. M7562
    Diagnosis
    The number range for document number assignment has not been maintained in the year 2014 for the transaction/event type WE.
    Procedure
    Contact your system administrator.
    in second case i have maintained number ranges in OBA7,OMBT,still iam facing with the same issue
    Regards
    Santosh

    Hi Dev,
    Thanks for your reply...yea i have done the ground work before posting this query
    but bitt confused with the post i have come across..
    Problem was occurring due to the wrong updating of raw material instead of finished goods in  MM01 (CREATION OF PURCHASE MM)
    however i have over come my 2nd issue,hopefull will over come my 1st issue also
    Thanks a lot
    Santosh 

  • Reg View creation in Generic

    Hi SDN,
    Im trying to create Generic Data source of View Method. I wanted to create View on BSID ( Closed Customer Invoices) and BSAD ( Open Customer invoices) Tables, But while creating its giving error as "THERE IS NO RELATION BETWEEN THE TABLES"  I want to know how to create Relation Between the tables. Both BSID & BSAD are standard tables, so we cant make any changes.
    Please let me know the procedure to bulid Rlation between the tables.
    Regards
    Sujan

    Hi Siva,
        You have to give relation between these two tables in tab "Table/Join Conditions".
    Creating Views:
    http://help.sap.com/saphelp_webas620/helpdata/en/cf/21ecf9446011d189700000e8322d00/frameset.htm
    View creation fr generic extraction
    Hope it Helps

  • Automatic TO creation and confirmation for a Material document

    Hi Dear All,
    i am new to MM andWM.
    I have to customization for auto transfer orders and confirmations for material documents what ever created with 101 movement type in Inventory Management. I have down configuration like below.
    SPRO->Logistics Execution->Warehouse Management->Activities->Transfers-> Set Up Autom. TO Creation for TRs / Posting Change Notices
    Double click on ‘control data ‘tab
    Hear for my warehouse I given input like   Auto TO = ‘1’,
                                                                             AddId = ‘select check box’.
    And in ‘Assign control’ tab for 101 movement type I have given input like below.
    Automatic TO = ‘1’.
    TO item can be confirmed immed. = ‘tick checkbox’
    Propose Confirmation = ‘tick checkbox’.
    Foreground/Backgrnd = ‘D’.
    After creating of Material document I am executing report RLAUTA10 in SE38.When I execute this report system showing message like ‘TO processing finished: TR total:   17, TO created:    0, Errors:   17’.
    If I check header details of transfer requirements in LB03, i am not seeing ‘Tick Mark’ in Auto TO Creation field.
    Can any one tell me what the mistake i have down or if i need to do any further configuration. Please help me regarding this concern?
    Thanks in Advance..

    Dear Steve,
    Thanks a lot for giving reply with what I need to do, but I am unable to see result.
    I have down configuration like below even though system not processing Auto TO creation. Can you explain me if I have down any mistake below.
    Click on ‘Assign’ button,
    Press on ‘New entries’
    WhN = ‘900’
    Reference Movement Type = ‘101’
    Movement indicator = ‘B’
    Movement type for Whse Mgmt = ‘101’
    TR create Transfer Requirement = ‘X’
    Immed.TO Creation
    Mail confirmation for background processing = ‘01’.
    GR date = ‘2’

  • Office 2013 latest update broke new profile creation on all network computers

    Hi,
    Reporting a bug here!
    Setup details:
    We're using samba 3 as our backend and all workstation are Windows 7 Pro x64.
    Office 2013 Home and Business Retail (en-us) Click 2 Run version
    Context:
    Deployed to the whole network of one of our client using the Office Deployement Tool.
    We update their base update (no updates) to the latest update 15.0.4569.1508
    Everything was working alright after initial Office 2013 installation with no updates. After updating the all the PCs to the latest version as of 31/03/2014, the user profile creation broke for newly created user.
    Symptoms and causes:
    Trying to log on as a new user on the machine would give the following error on Logon before automatically loging off because it cannot copy the following file to the new user profile:
    D:\Users\Default\AppData\Local\Microsoft\Windows Live\Bici\_00.sqm
    D:\Users\Default\AppData\Local\Microsoft\Windows Live\Bici\_01.sqm
    D:\Users\Default\AppData\Local\Microsoft\Windows Live\Bici\_02.sqm
    The Bici folder has Read and Execute permissions for everyone but the _XX.sqm files inside only have permissions (Full Control) for SYSTEM and Administrators and LOCAL SERVICE with the all permissions EXCEPT:
    - FULL CONTROL
    - TRAVERSE FOLDERS/EXECUTE FILES
    - CHANGE PERMISSIONS
    - TAKE OWNERSHIP
    Solution:
    I gave "everyone" Read and Execute permission on those files and the new user could log in and his profile got created alright.
    The files with broken permissions time stamp shows they've been modified during the Office 2013 update and Bici seems to be a OneDrive related service. This bug should get fixed ASAP.
    Event log error:
    Windows cannot copy file \\?\D:\Users\Default\AppData\Local\Microsoft\Windows Live\Bici\_01.sqm to location \\?\D:\Users\TEMP\AppData\Local\Microsoft\Windows Live\Bici\_01.sqm. This error may be caused by network problems or insufficient security rights.
     DETAIL - Access is denied.
    - <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    - <System>
      <Provider Name="Microsoft-Windows-User Profiles General" Guid="{DB00DFB6-29F9-4A9C-9B3B-1F4F9E7D9770}" />
      <EventID>1509</EventID>
      <Version>0</Version>
      <Level>3</Level>
      <Task>0</Task>
      <Opcode>0</Opcode>
      <Keywords>0x8000000000000000</Keywords>
      <TimeCreated SystemTime="2014-04-04T07:15:51.922563800Z" />
      <EventRecordID>9615</EventRecordID>
      <Correlation />
      <Execution ProcessID="940" ThreadID="1764" />
      <Channel>Application</Channel>
      <Computer>F00241D1DAAAD</Computer>
      <Security UserID="S-1-5-21-1582357797-4105456612-768596941-1206" />
      </System>
    - <EventData Name="EVENT_COPYERROR">
      <Data Name="Source">\\?\D:\Users\Default\AppData\Local\Microsoft\Windows Live\Bici\_01.sqm</Data>
      <Data Name="Target">\\?\D:\Users\TEMP\AppData\Local\Microsoft\Windows Live\Bici\_01.sqm</Data>
      <Data Name="Error">Access is denied.</Data>
      </EventData>
      </Event>

    Hi dude,
    I appreciate that your sharing your experience and solution here. And, I would report it through our internal channel. Thanks again. 
    Tony Chen
    TechNet Community Support

  • Multiple iDvd creation issues

    Howdy,
    I've got multiple questions I've been meaning to address for awhile but I'm always forgetting so while I'm sitting here at work thinking about them I'm just gonna throw them all into one big post (I never tend to think about this stuff when I'm actually at home in front of the computer). Any help will be appreciated.
    First let me note that I'm using one of the flat panel 17" imacs. It's like 3 years old now but it's served me very well so far. I've added more memory & an external hard drive & am using iLife 6.
    DVD-R:
    The only dvds (besides movies & the like) that the superdrive recognizes are DVD-R's. Has anyone ever come up w/ a way to use DVD+Rs or better on these old machines?
    Continuous Play Music Video DVDs:
    My goal is to make music video mix dvds. This means I want to burn music vids on a dvd that can be accessed separately or you can just pop the dvd in & click play & it will run through the whole dvd. Problem is I haven't found any kind of continuous play option in idvd. So the obvious choice is to convert all of the videos into one long movie in iMovie (broken into chapters) but of course I've been unsuccesful at this. Even though I've converted the videos into the proper format (arrived at through research on this forum) the videos don't load into imovie correctly...at least 3 out the 4 I tried didn't (tried multiple times on each). It would condense the video into like a quarter of the screen & leave everything else black space. So anyone got any suggestions on how I can get this done?
    SD on Widescreen formatted disc:
    I have burned a music video DVD a little while back & ended up w/ something interesting. I formatted the disc for widescreen assuming the standard def(4:3) videos would all just be letterboxed on the side but the result was that some were & some weren't (in fact most weren't). This means they are stretched out to widescreen. This isn't a huge deal since I can use the tv itself to letterbox them but still I'd like to know if there is a way to deal with this in the creation of the disk. Any suggestions?
    Forgive me if I've missed anything obvious. I have tried at various times to research each of these topics but haven't found any answers. Thanks.

    Hello Farrell,
    for this kind of project you'll need to get your workflow straightened out - and I think at the moment you're "mixing apples & pears".
    The only dvds (besides movies & the like) that the superdrive recognizes are DVD-R's. Has anyone ever come up w/ a way to use DVD+Rs or better on these old machines?
    DVD-R media is actually your best bet compatibility-wise. The only other option would be Double-Layer DVD+R, but that would mean getting an external burner in your case. If your content doesn't exceed, say 90-100 min. I would stick with the DVD-R.
    Even though I've converted the videos into the proper format (arrived at through research on this forum) the videos don't load into imovie correctly...
    You might have converted to the correct format, but obviously the sizes don't match. DV video is 720x480 (NTSC) or 720x576 (PAL), so if you want to fill the screen, you'll have to convert to the proper size. On the other hand, if you have some web clips at 320x240, up-rezzing them might degrade the quality to a point that the whole thing becomes unwatchable.
    I formatted the disc for widescreen assuming the standard def(4:3) videos would all just be letterboxed on the side but the result was that some were & some weren't (in fact most weren't)
    If you want to burn a widescreen DVD, you'll need to start off with a widescreen project in iMovie. As you have quite mixed footage, the best thing would be to turn on "auto letter & pillarboxing" in preferences. This will preserve the correct aspect ratio of your clips.
    but still I'd like to know if there is a way to deal with this in the creation of the disk
    Widescreen DVDs created in iDVD 6 are set to "auto letterboxing & pan-scan", meaning it depends on the setting of your DVD player how the disc will be displayed - but as you found out, you can easily toggle the view option on your remote.
    If you want to force letterboxing, you can re-edit your final DVD with a little app called myDVDedit (http://www.mydvdedit.com/).
    hope this helps
    mish

  • Blu-ray creation causes windows blue screen crash

    I am testing Premier Elements 7 for the creation of best quality DVD and Blu ray disks. Source is AVCHD 1920x1080i and I have managed to create a number of DVD's and one Bluray without problem. My latest trial creating a Bluray disk failed at about 98%, burn in progress with a Device Error message. This resulted in a blue screen windows crash. Far more worrying is if I re-insert that BD RE disk back into my PC to erase it and try again, it immediately prompts a Blue screen windows crash, so I guess the disk is ruined. I have previously used Premiere Pro, Ulead and more recently Cyberlink Power Director and Sony Vegas. The quality of the DVD footage produced by Premier is far superior and the Bluray output was also excellent. Cyberlink has proved to be a good package appart from the poor quality of re-rendered output. Sony Vegas Pro seems the only one to recognise raw AVCHD footage and opt not to recompress it!!! The Movie Studio version doesn't appear to do this, however, I have only had a limited go at the trials. I had narrowed my choice to upgrading to Adobe Premier, or the cheaper Elements 7 which suits my requirements for home movies, however, a major windows crash, which I tend never to get has got me running scared. Why o why is there not a burn to hard disk option for Bluray creation as for DVD? Has anyone experienced a similar problem - any ideas as to what I could try?

    A BSOD situation normally indicates something is wrong systemicly with the computer. It can be either software (usually OS), or hardware related.
    The first thing that I would do would be to gather all info on your system and list full OS, version, updates, etc., and all hardware specs. Something in those lists might provide a clue.
    Next, I'd look carefully at Event Viewer, especially at the System and Applications tabs. Look for yellow warning messages at the time of the BSOD, and especially the red error messages. It might be easier to invoke a BSOD, so you will know the exact time and date of the crash. Study each yellow and each red message carefully. Many might not yield much useful info, but some might tell you a lot of about what is happening, and may even give you the cause. Please explore every link that is offered in each of these messages. They should take you to either the MS site, or to the site of a software, or hardware company. These will likely be where you'll gather the most important data.
    Here's what to look for in Event Viewer:
    Give us any details found there.
    Also, see this LINK. The video is a bit long, but will furnish you with a lot of troubleshooting tips, and also tools from MS. Make notes of these tools and their use.
    Good luck,
    Hunt

Maybe you are looking for

  • Illustrator CC won't open

    Hi-- I just tried to open AI from Creative Cloud and it won't open. This may have had to do with a cleanup operation I did yesterday. Here's the problem report. I have no idea what to make of it. Can anyone help? Process:         Adobe Illustrator [1

  • Bapi for Picking, Packing and Post goods issue (WS_DELIVERY_UPDATE)

    Hi, I have a requirement to update the outbound delivery. In that, I need to update the picking, Packing details and have to complete the PGI for the particular delivery. I got the suitable function module for the same is : WS_DELIVERY_UPDATE. Can an

  • Sales Quotation Scenario - need help

    Hi, I need help in fulfilling my client requirement. Once quotation is created it should be in the blocked stage. Once the sales manager changes the quantity it should  not allowed to change the quantity and only Marketing director can change the qua

  • New contract status

    Hi, We are having classic scenario with GOA implemented. We are doing spend analysis using customised abap reports.We want to create status key "EXPIRED" for expired contract based on contract validity. Is there any way to create this status in table

  • Problem in accessing the drill down report via RRI

    Hi guru's,           ThanX in advance for all the stuff you are providing. I have a problem with the drill down report.I have two reports Q1 and Q2 where Iam navigating to Q2 from Q1 via RRI.But when I try to drill down to the Report Q2 It gets into