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

Urgent Please

Hello SDN's,

Doubt : 1 I have a requirement where in i need to place a button in the table control of a customised screen. when ever user clicks the screen, i should go to a screen similar like SO10, where user keys in some texts in multiple lines.

How to achieve this?

And how should i save the texts entered by the user? i have a Z table which has a field long text, so my question is how to save the texts entered by the user into my Z Table.

Please go through IW32 - > Operations Tab - > LT. the LT is a button which leads to text editor.

Doubt 2 : i have a empty table control, how do i save the entered data into a ztable and i shud not allow the user to enter values in rows which are already being entered.

Please help.. its very very urgent

Rewards for sure.

Pratyusha.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    Posted on Sep 22, 2006 at 10:38 AM

    For LONGTEXT try using the function module EDIT_TEXT.

    DATA : header LIKE thead.

    DATA : BEGIN OF lines OCCURS 0,

    lines LIKE tline,

    END OF lines.

    • AT USER COMMAND WRITE THIS CODE. just design a simple screen with a button on it and try this.

    CASE sy-ucomm.

    WHEN 'LT'.

    header-tdobject = 'BOM'.

    header-tdid = 'DKO'.

    header-tdspras = 'EN'.

    header-tdlinesize = 100.

    CALL FUNCTION 'EDIT_TEXT'

    EXPORTING

    header = header

    TABLES

    lines = lines.

    IF sy-subrc <> 0.

    ENDIF.

    ENDCASE.

    Regards

    Gopi

    Message was edited by: Gopi Narendra

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 22, 2006 at 11:05 AM

    Hi Pratyusha,

    for the second doubt,if iam not wrong ur ztable should hv some key(primary).See i have three fields matnr,mtart,werks.I have made matnr as primary key.

    in the PAI event

    loop the table control(itab).

    now create the pai module and write.

    case sy-ucomm.

    when 'SAVE'.

    SELECT matnr werks mtart from ztable

    where matnr = itab-matnr.

    if sy-subrc eq 0.

    throw error message saying entry already exists.

    else.

    insert ztable.

    endif.

    endloop.

    try like this.

    Regards,

    nagaraj

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 22, 2006 at 10:36 AM

    Hi Pratyusha,

    create a screen with one push button.The first screen number is 1001 and second screen number is 1002.Then write the logic in the PAI of that screen.

    case sy-ucomm.

    when 'PB'.

    leave to screen 1002.

    endcase.

    Now when u click on push button it will take u next screen.Now design ur second screen like SO10.

    Inorder to save the zfield then u need to write the logic in PAI and under sy-ucomm 'SAVE'.

    Regards,

    Nagaraj

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 22, 2006 at 10:41 AM

    Hi Pratyusha,

    For the second doubt.

    In the table control attributes give the column to be fixed.

    regards,

    Nagaraj

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Nagraj,

      Thanks for the reply.

      for doubt 1 u did not understood me, just see IW32 - > Operations Tab - > LT Column. the LT which is seen there is a Button. so if u press that button you will come to know.

      My 2nd doubt was i shud nt be able to enter multiple entries in the table control.

      for Ex:

      Line no LT Qty Unit Price Curr

      10 BUTTON 10 EA 100 INR

      So when in enter values in 2nd row i should not be able to enter 10.

      these values whihc i enter am supposed to store in a Ztable.

      Please help.

      Pratyusha

  • author's profile photo Former Member
    Former Member
    Posted on Sep 22, 2006 at 10:48 AM

    Hi usha,

    Doubt 1: Using okcode or sy-ucomm check for the event in push button then in code,,,

    case sy-ucomm.

    when 'SO10'.

    SET SCREEN '0010'. 'Screen similar to so10

    LEAVE SCREEN.

    END CASE

    END MODULE.

    IN Module '0010'

    you will be having push button to enter the field text to ztable.

    case sy-ucomm.

    when 'lt'.

    INSERT ztable.

    if sy-subrc eq 0.

    message

    endif.

    endcase.

    end module.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.