How to achieve the described output with procedural language?

INPUT:
cell_no
column 0
column 1
column 2
column 3
1
12345678
100
2
44
2
12345678
100
3
13.87
3
12345678
100
4
13.87
4
12345678
101
3
14.35
5
12345678
101
4
14.35
6
12345678
102
3
14.83
7
12345678
102
4
14.83
8
12345678
103
3
0.95
9
12345678
103
4
0.95
Note: Treat cell_no as row number
         Consider column 0 as invoice no
OUTPUT:
cell_no
column 0
column 1
column 2
column 3
1
12345678
100
2
0
2
12345678
100
2
44
3
12345678
100
4
13.87
4
12345678
100
2
30.13
5
12345678
101
2
30.13
6
12345678
101
2
0
7
12345678
101
4
14.35
8
12345678
101
2
15.78
9
12345678
102
2
15.78
10
12345678
102
2
0
11
12345678
102
4
14.83
12
12345678
102
2
0.95
13
12345678
103
2
0.95
14
12345678
103
2
0
15
12345678
103
4
0.95
16
12345678
103
2
0
Note: Treat cell_no as row number
         Consider column 0 as invoice no
Description:
cell_no 4 = (cell_no 1 + cell_no 2) - cell_no 3
cell_no 5 = cell_no 4
cell_no 8 = (cell_no 5 + cell_no 6) - cell_no 7
cell_no 9 = cell_no 8
cell_no 12 = (cell_no 9 + cell_no 10) - cell_no 11
cell_no 13 = cell_no 12
cell_no 16 = (cell_no 13 + cell_no 14) - cell_no 15
Thanks in advance

INPUT TABLE:
column 0 as invoice no
column 1 as periodic no
column 2 as process type
column 3 as amount
I am going to start an opening account at 0 and have to make closing account as 0 by following four process namely opening opening account, invoice generated, invoice paid & closing account.
Process_id
Process_type
Initial Month
Subsequent month
A
Opening account
0
value of D
B
Invoice generated (2)
Same
0
C
Invoice paid (4)
Same
Same
D
Closing account
(A+B)-C
(A+B)-C
The above process is done started from A to D until closing account becomes zero. It is started from periodic_no 100 till 103. 

Similar Messages

  • How to display the Form output in multiple languages ? ------ Urgent

    How to display the Form output in multiple languages ? -
    Urgent

    Hi,
    Do u mean the Form output in 2-3 languages ...like form output will be having english russian etc...
    for the above case , what u have to do ...
    first have to get the transalations for all the fields
    say for example : if the english word is PO Number , then u have to get the transalation text for PO Number :
    after this , what u have to is ,,, Log on to SAP with russian language ,  then in the form o/p u have to paste that russian test ( translation text ) ...
    do like this for all the components in the form .
    Reward Points if it is Useful.
    Thanks,
    Manjunath MS

  • How to download the ALV output with colors into the excel sheet

    Hi,
      I'm having an ALV Grid report output where each and every row has some colors in it. When i download it to an excel sheet whatever the colors that comes on the output of the report the same should come in the excel sheet. When i download the output to an excel sheet using List --> Export -->Local file . If i open the excel files no colors are coming in the excel sheet.
    can anyone tell how to get the colors in the excel sheet also. thanks...
    Regards,
    Rose.

    Hi Camila,
    Use the OLE concept.
    Check the below threads:
    Colors in Excel Sheet
    colors in alv
    Regards,
    Soumya.

  • How to achieve the below output

    Hi All,
        I have a source table, and i need to generate the below output using Data Services.
    Source Table:
    Legacy_number
    Legacy_name
    Address
    z_inscope
    z_sold_to
    z_ship_to
    z_invoice_to
    123
    sam
    123 main st
    Y
    y
    N
    N
    345
    PAUL
    234 oxford st
    y
    y
    N
    N
    345
    PAUL
    234 oxford st
    y
    n
    n
    y
    456
    alex
    34 e ave
    y
    y
    n
    n
    456
    alex
    34 e ave
    y
    n
    y
    n
    456
    alex
    34 e ave
    y
    n
    n
    y
    Output Table:
    Legacy_number
    Legacy_name
    Address
    z_inscope
    z_sold_to
    z_ship_to
    z_invoice_to
    123
    sam
    123 main st
    Y
    y
    N
    N
    345
    PAUL
    234 oxford st
    y
    y
    N
    y
    456
    alex
    34 e ave
    y
    y
    y
    y
    We nee to generate a table which need to have only single Legacy_number in output table and z_inscope, z_sold_to, z_ship_to,z_invoice_to have to check their values in source table and replaced their columns with the following priority order Y,y,N,n in Output table.
    for explanation  see below example.
    1. for 345 Legacy number we have y & n for z_sold_to column. In output table that column need to be replaced with y as y priority is higher than n.
    2. for 456 Legacy number we have n & y & n for z_ship_to column. In output table that column need to be replaced with y as y priority is higher than n.
    Thanks in advance.

    Hello
    This is possible using lots of various techniques.  You allude to a technique in your question - priority.
    For each z column (I hate adding a z - is this from ECC?!), add a new column via a query and assign a priority to each value.  In a second query get the max priority for each column for the key (this will return only 1 row per key), then convert the priority back to the actual value.
    Michael

  • How to print the list outout with out getting output?

    How to print the list outout with out getting output?
    My requirement is that when i exicute the program the list output has to print with out getting output list display on the screen.
    if possible cana anyone share the code....
    Phani,

    See this Sample Program.
    DATA: PARAMS LIKE PRI_PARAMS,
          DAYS(1)  TYPE N VALUE 2,
          COUNT(3) TYPE N VALUE 1,
          VALID    TYPE C.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING DESTINATION           = 'LT50'
                COPIES                = COUNT
                LIST_NAME             = 'TEST'
                LIST_TEXT             = 'SUBMIT ... TO SAP-SPOOL'
                IMMEDIATELY           = 'X'
                RELEASE               = 'X'
                NEW_LIST_ID           = 'X'
                EXPIRATION            = DAYS
                LINE_SIZE             = 79
                LINE_COUNT            = 23
                LAYOUT                = 'X_PAPER'
                SAP_COVER_PAGE        = 'X'
                COVER_PAGE            = 'X'
                RECEIVER              = 'SAP*'
                DEPARTMENT            = 'System'
                NO_DIALOG             = ' '
      IMPORTING OUT_PARAMETERS        = PARAMS
                VALID                 = VALID.
    IF VALID <> SPACE.
      SUBMIT RSTEST00 TO SAP-SPOOL
        SPOOL PARAMETERS PARAMS
        WITHOUT SPOOL DYNPRO.
    ENDIF.
    Awrd POints If useful
    Bhupal

  • How to achieve the results by Query ??

    Hello Guys,
    I have couple tables which I need to join to get the result....This is what is in the tables...
    CList Table
    CID, Name
    A, ABC
    B,CDE
    C,JFK
    JList Table
    JID, Name
    1, Something
    2, Another
    3, Else
    4, Should be something
    JOb_2_Courses
    JobID, CourseID
    1,A
    1,B
    2,C
    Employee Table
    EID, Job_ID
    1A, 1
    2A,1
    3B,1
    2C,2
    23D,3
    CStatus Table
    StatusID, Desc
    1,Completed
    2,Pending Approval
    3,Declined
    4,Scheduled
    5,Register
    Now user can only register the course which are related with their job....NO course else.....
    When they register it is moved to temp_course_registration and then once completed to COURSE_HISTORY
    For Example : So Employee : 1A will see two courses to register A and B...
    Say he registers A....it makes an entry in temp_course_registration table with the course id, employeeid and date....
    With further steps once that status is updated to '1'.....the course is deleted from temp_course_registration and is moved to course_history........
    Now to show to the user...I need to include all my tables in the query and on the basis of status, show necessary things to the user....
    Output :
    Course_ID, Status.............
    Say if they completed the course will come from course_history, if in the process will come from temp_course_registration.....if nothing is in the tables for the specific employee...this means status is '5' and they need to register everything...
    Can someone let me know, how to achieve the results....
    Thanks,
    Harsimrat

    Hello
    I'm off home now so I can't look at the query, but for future reference, if you want to improve your chances of getting help, you need to provide simple create table statements, and test data to go with it. I've done that with what you provided and hopefully someone else will be able to help. Also, you were asked if you could provide this in your other thread...
    CREATE TABLE CList(CID varchar2(1), Name varchar2(3))
    insert into clist values('A', 'ABC');
    insert into clist values('B','CDE');
    insert into clist values('C','JFK');
    CREATE TABLE JList(JID number, Name varchar2(30))
    insert into jlist values(1, 'Something');
    insert into jlist values(2, 'Another');
    insert into jlist values(3, 'Else');
    insert into jlist values(4, 'Should be something');
    CREATE TABLE JOb_2_Courses(JobID number, CourseID varchar2(1))
    insert into job_2_courses VALUES(1,'A');
    insert into job_2_courses VALUES(1,'B');
    insert into job_2_courses VALUES(2,'C');
    CREATE TABLE Employee (EID varchar2(3), Job_ID number)
    INSERT INTO employee VALUES('1A', 1);
    INSERT INTO employee VALUES('2A',1);
    INSERT INTO employee VALUES('3B',1);
    INSERT INTO employee VALUES('2C',2);
    INSERT INTO employee VALUES('23D',3);
    CREATE TABLE CStatus(StatusID number, Descr varchar2(30))
    insert into cstatus values(1,'Completed');
    insert into cstatus values(2,'Pending Approval');
    insert into cstatus values(3,'Declined');
    insert into cstatus values(4,'Scheduled');
    insert into cstatus values(5,'Register');HTH
    David

  • How to create production version & Explain with procedure

    how to create production version & Explain with procedure
    Madan

    Hi Madan,
    Production Versions are used to describe the production process to be used for planned / production order.
    Why is it required?
    Suppose you have 2/3 production lines and 2/3 alternative BOMs to produce one Finished Goods.
    How system will come to know which BOM and Routing to be used. This is done thru Prod.Version.
    In production version we maintain the combination of BOM and routing.
    Also it can be designed with lot size or validity period.
    Go to MM02--->MRP4 / Work scheduling view -
    > Prod.Version.
    Enter the validity period and lot size. and the production version should be unlocked.
    After entering the reqd. routing no. and BOM alternative , carry a check.
    After getting the Green signals ,Continue.
    Thus you have saved the prod. version.
    Mass processing TCode- C223.
    Hope it would clarify you the basic of production version.

  • How to get the Query output to Excel

    Hi ,
    Can you tell me how to get the Query output to excel with out using any third party tool?
    Can you tell me how to write the code in Webservice and call it..
    Please explain it Elaboartly..
    Thanks in Advance!!!
    Mini

    whats your source system?
    you can use Live office, or query as a webservice if you are getting data from universe
    if you're getting data from SAP BI query and you have a java stack on your netweaver then you can get the data directly using sap bi connector in xcelsius.
    good luck

  • How to extract the xcontrol output

    I created one xcontrol for pressure sensors . I am able to display the output correctly but i could not able to use the output for other inputs .
    how to extract the xcontrol output
    for clear understanding please see the attached vi testing .
    Attachments:
    testing.vi ‏9 KB
    Pressure sensors.zip ‏96 KB
    testing.vi ‏9 KB

    I always measure velocity in furlongs per fortnight 
    Units are very powerful, and like any great magic, can result in serious unintended circumstances.
    I've tried them a couple of times and decided they were more difficult to use than the value provided. Maybe it's better now, but I'm still on LV 8.6
    http://forums.ni.com/t5/LabVIEW/Why-do-very-few-programmers-use-LabVIEW-unit-labels/td-p/1119746
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • How to send the report output to the application server in a excel file

    Hello,
    how to send the report output to the application server in a excel file.
    and the report runs in background.
    Thanks in advance.
    Sundeep

    Dear Sundeep.
    I'm providing you with the following piece of code ... Its working fine for me ... hopefully it suits your requirement ...
    D A T A D E C L A R A T I O N *
    TYPES: BEGIN OF TY_EXCEL,
    CELL_01(80) TYPE C,
    CELL_02(80) TYPE C,
    CELL_03(80) TYPE C,
    CELL_04(80) TYPE C,
    CELL_05(80) TYPE C,
    CELL_06(80) TYPE C,
    CELL_07(80) TYPE C,
    CELL_08(80) TYPE C,
    CELL_09(80) TYPE C,
    CELL_10(80) TYPE C,
    END OF TY_EXCEL.
    DATA: IT_EXCEL TYPE STANDARD TABLE OF TY_EXCEL,
    WA_EXCEL TYPE TY_EXCEL..
    E V E N T : S T A R T - O F - S E L E C T I O N *
    START-OF-SELECTION.
    Here you populate the Internal Table.
    Display - Top of the Page.
    PERFORM DISPLAY_TOP_OF_PAGE.
    E V E N T : E N D - O F - S E L E C T I O N *
    END-OF-SELECTION.
    SET PF-STATUS 'GUI_STATUS'.
    E V E N T : A T U S E R - C O M M AN D *
    AT USER-COMMAND.
    CASE SY-UCOMM.
    WHEN 'EXPORT'.
    Exporting the report data to Excel.
    PERFORM EXPORT_TO_EXCEL.
    ENDCASE.
    *& Form DISPLAY_TOP_OF_PAGE
    text
    --> p1 text
    <-- p2 text
    FORM DISPLAY_TOP_OF_PAGE .
    SKIP.
    WRITE: /05(128) SY-ULINE,
    /05 SY-VLINE,
    06(127) 'O R I C A'
    CENTERED COLOR 1,
    132 SY-VLINE.
    WRITE: /05(128) SY-ULINE,
    /05 SY-VLINE,
    06(127) 'Shift Asset Depreciation - Period/Year-wise Report.'
    CENTERED COLOR 4 INTENSIFIED OFF,
    132 SY-VLINE.
    WRITE: /05(128) SY-ULINE.
    E X C E L O P E R A T I O N
    CLEAR: IT_EXCEL[],
    WA_EXCEL.
    PERFORM APPEND_BLANK_LINE USING 1.
    WA_EXCEL-cell_02 = ' XYZ Ltd. '.
    APPEND WA_EXCEL TO IT_EXCEL.
    CLEAR: WA_EXCEL.
    WA_EXCEL-cell_02 = 'Shift Asset Depreciation - Period/Year-wise Report.'.
    APPEND WA_EXCEL TO IT_EXCEL.
    PERFORM APPEND_BLANK_LINE USING 1.
    ENDFORM. " DISPLAY_TOP_OF_PAGE
    *& Form APPEND_BLANK_LINE
    text
    -->P_1 text
    FORM APPEND_BLANK_LINE USING P_LINE TYPE I.
    DO P_LINE TIMES.
    CLEAR: WA_EXCEL.
    APPEND WA_EXCEL TO IT_EXCEL.
    enddo.
    ENDFORM.
    *& Form EXPORT_TO_EXCEL
    text
    --> p1 text
    <-- p2 text
    FORM EXPORT_TO_EXCEL .
    DATA: L_FILE_NAME(60) TYPE C.
    Create a file name
    CONCATENATE 'C:\' 'Shift_Depn_' SY-DATUM6(2) '.' SY-DATUM4(2)
    '.' SY-DATUM+0(4) INTO L_FILE_NAME.
    Pass the internal table (it_excel which is already populated )
    to the function module for excel download.
    CALL FUNCTION 'WS_EXCEL'
    exporting
    filename = L_FILE_NAME
    tables
    data = IT_EXCEL
    exceptions
    unknown_error = 1
    others = 2.
    if sy-subrc <> 0.
    message e001(ymm) with 'Error in exporting to Excel.'.
    endif.
    ENDFORM. " EXPORT_TO_EXCEL
    *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    When you click the button - Export to Excel ( GUI-Status) you'll be able to export the content of the Internal Table to an Excel file .......
    Regards,
    Abir
    Don't forget to award Points *

  • How to know the forms associated with a specific transaction

    Hi..
    Can anyone please suggest me how to know the forms associated with a specific transaction.
    For Example In Finance module.
    I came to know from SDN the form associated with F.64 as F140_acc_stat_01.
    But i need the steps how to track the form name.
    Regards..
    Vinodh

    Hi,
    1.We cann't find the forms associated with a specific transaction.
    2.But,based on requirement we can go for the form selection.
    3.Suppose in account payable and receivable , we have different forms like customer statement, Dunning and Chek form etc.
    4.The functional people can find the form name in SPRO and give the details of the requirement.
      5.If u have the output type or formname u can go for the TNAPR and  TTXFP tables and u can search for the respect object.
    6.For FI u can directly find in the SPRO, by searching it with the form name.
    Regards,
    If helpful reward with points(Don't forget).

  • How to achieve the best quality when doing a narration?

    Hello,
    I'm trying to figure out how to achieve the best possible narration in a documentary I'm doing using the FCP voice over tool, a USB mic, and Final Cut Studio's audio filters. Am I on the right track? How do I clean up an average voice over narration? Do I need additional equipment? Any advice would be appreciated.
    Thanks,
    Jordan

    The best thing you can do is to record it properly in the first place - if you want it to sound good. The environment you record in is VERY important as is the choice of mic you use ... most of the consumer USB mics aren't all that great in terms of quality.
    Record in an acoustically flat room with good sound dampening. Even a clothes closet will do in a pinch. Record through a mixer so you can monitor the VO artist as they record. I've found it better to record to tape (camera or VTR) with a pro mic than to use FCP's voice over tool.
    -DH

  • How to achieve the fatest Digital IO write speed?

    How fast can I write to a digital IO port?How to achieve the fatest write speed? For test purpose, after config port, using DIO Port write.vi in a whileLoop by 6024E board,repeatly write1-2(01 and 10bin), i can only get a speed about 10kHz,i.e. every 106 us write a byte, can that be faster? how? software solution and hardware solution? Thanks!

    Hey Yfayne,
    It is very hard to say how fast you can write the digital lines on an E-Series device, because it is completely software and computer dependent. The exact same DAQ device with the exact same code will execute completely different on a 233MHz machine when compared to a 2.4GHz machine, because it depends on how fast the computer can execute the loop. If your program slows down to perform another task like opening another program or surfing the web it will slow the rate the computer can execute the loop and mess up the timing.
    In addition, the digital lines on the E-Series use the DAQ-STC chip that was never designed for high speed. If you need a high speed hardware time device I would suggest using the PCI-6533 or PCI-6534. The devices were desig
    ned for high speed digital applications and can easily exceed the 10 kHz rate consistently.
    Here are a few links that you will find useful.
    http://zone.ni.com/devzone/conceptd.nsf/webmain/467ed254f3a30b1286256a6f00720951
    http://sine.ni.com/apps/we/nioc.vp?cid=1104〈=US
    I hope this helps out.
    Joshua P.
    Application Engineering
    National Instruments

  • Settle the QM order with procedure

    Dear all
    How the settle the QM order with procedure  ? and wht prerequisite is required for the same.?
    plz guide me
    thx

    Dear Patil
    Please check the below link and then give your feedback
    Link: [QM order]
    Regards
    Gajesh

  • How to program a midi foot controller on Mainstage? Does anyone knows how to program the foot controller with exclusive solo channel in order not to dance "tip tap" while from clean guitar I go to crunch or solo? How to do this programming on Mainstage?

    How to program a midi foot controller on Mainstage? Does anyone knows how to program the foot controller with exclusive solo channel in order not to dance "tip tap" while from clean guitar I go to crunch or solo? How to do this programming on Mainstage?
    I basically managed to learn how to invert parameters which allows me to be as default in the clean guitar channel and if I switch the first button on the midi foot controller I switch to crunch, but at this point I tryied so hard to programm the second and third button to switch, only through a button in one step, to a third channel for distorsion or a 4th channel for solo guitar but I couldn't figured out how this work can be done!
    I would appreciate if anyone could help or share this experience with others who are experiencing the same problem.
    Cheers.
    F.

    I cannot seem to get mainstage to recognize my FCB either. I am using IFCB. Anyone figure this out?
    Thanks,
    Eric

Maybe you are looking for