Skip to Content
author's profile photo Former Member
Former Member

How can I update from a screen that is call within a report program?

I created a screen to capture new data and save it on the ztables that i created, this screen is part of a report program that works as fallows:

(in a selection screen) if the customer exist will display a basic list with the info. of that customer.

if the customer dosen't exits, then i call the screen to create the customer. i'm stuck in that part. I don't know how to update the ztables from the screen.

can someone help me.

this is on mini sap 6.10

regards....

Fidel Peralta

Add comment
10|10000 characters needed characters exceeded

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Mar 28, 2004 at 02:24 PM

    Simply place the update code into the PAI section of the screen. One way would be to create a work area with the same structure as your table and within the PAI section of your screen populate this work area with your screen fields. Then use the modify command which i think is somthing like:

    MODIFY <dbtab> FROM <work area>.

    Hope this helps

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 29, 2004 at 10:14 PM

    > I created a screen to capture new data and save it on

    > the ztables that i created, this screen is part of a

    > report program that works as fallows:

    > (in a selection screen) if the customer exist will

    > l display a basic list with the info. of that

    > customer.

    > if the customer dosen't exits, then i call the

    > screen to create the customer. i'm stuck in that

    > part. I don't know how to update the ztables from the

    > screen.

    > can someone help me.

    >

    > this is on mini sap 6.10

    > regards....

    > Fidel Peralta

    I still have problems when I am going to update the tables on my program.

    This is the PAI of the screen to create new customers.

    (in that screen i have fields of two different tables, zclient and zprestamo.)

    If someone cant tell me what I am doing wrong in the

    modify part I will appriciate it.

    ...thankz for the help Mart.

    Fidel Peralta.

    MODULE user_command_0100 INPUT.

    CASE ok_code.

    WHEN 'reset'.

    LEAVE TO SCREEN 100.

    WHEN 'save'.

    <b>MOVE-CORRESPONDING: zscrprestamo TO wa_prestamo,

    zscrprestamo TO wa_client.</b>

    period = wa_prestamo-amount_borrow + (

    wa_prestamo-amount_borrow * interes ) /

    wa_prestamo-timetopay.

    <b>TABLES zclient.

    zclient-client_id = wa_client-client_id.

    zclient-last_name = wa_client-last_name.

    zclient-first_name = wa_client-first_name.

    zclient-street = wa_client-street.

    zclient-city = wa_client-city.

    zclient-zipcode = wa_client-zipcode.

    zclient-phone_number = wa_client-phone_number.

    zclient-status = wa_client-status.

    MODIFY zclient.

    IF sy-subrc = 0.

    COMMIT WORK.

    ELSE.

    ROLLBACK WORK.

    ENDIF.</b>

    <b>TABLES zprestamo.

    zprestamo-amount_borrow = wa_prestamo-amount_borrow.

    zprestamo-amount_to_pay = period.

    zprestamo-timetopay = wa_prestamo-timetopay.

    MODIFY zprestamo.

    IF sy-subrc = 0.

    COMMIT WORK.

    ELSE.

    ROLLBACK WORK.

    ENDIF.</b>

    LEAVE TO SCREEN 0.

    ENDCASE.

    ENDMODULE. " USER_COMMAND_0100 INPUT

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 31, 2004 at 03:16 AM

    Those are new data.

    Can I update ztables on mini sap from a programm ?

    Thank Deepak and Mart.

    Help will be apriciated.

    kind regards....

    Fidel Peralta.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Sorry mate i have never used MiniSAP, not yet anyway, got the disk the other day just waiting to get windows XP so i can use it. Anyway back to your problem, can you add entries to the Z table using SE11, if so have you tryed the insert command to see if that makes any difference.

      INSERT <dtab>