Screen Painter and tables

I have created a Table Control in a Screen Painter and I need help to fill it.
I assign to the Table Control a field of an internal table but when I try to activate it i receive the followin error:
The field "XXXX-XXXX" is not assigned to a LOOP. "LOOP...ENDLOOP" must apper in PBO and PAI
Can u help me?
Thanx in advance

Hi Jose,
Refer the below code for clarification.
Regards,
Raj
*& Module pool ZTESTRAJ_TABLECONTROL *
PROGRAM ztestraj_tablecontrol .
TABLES mara.
CONTROLS : tc1 TYPE TABLEVIEW USING SCREEN 100.
TYPES : BEGIN OF t_mara,
matnr TYPE mara-matnr,
mtart TYPE mara-mtart,
mbrsh TYPE mara-mbrsh,
meins TYPE mara-meins,
lsel TYPE c,
END OF t_mara.
DATA : it_mara TYPE STANDARD TABLE OF t_mara WITH HEADER LINE,
it_mara1 TYPE STANDARD TABLE OF t_mara WITH HEADER LINE,
cols LIKE LINE OF tc1-cols.
DATA : v_lines TYPE i,
lsel,
v_fill TYPE i,
v_limit TYPE i.
DATA : fg_set TYPE c VALUE ''.
DATA : ok_code TYPE sy-ucomm,
save_ok TYPE sy-ucomm.
CONSTANTS : c_mtart(4) TYPE c VALUE 'FERT'.
*& Module STATUS_0100 OUTPUT
text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'SCREEN_100'.
SET TITLEBAR 'RAJ'.
IF fg_set = ''.
SELECT matnr
mtart
mbrsh
meins
FROM mara
INTO TABLE it_mara
WHERE mtart = c_mtart.
DESCRIBE TABLE it_mara LINES v_fill.
v_lines = v_fill.
fg_set = 'X'.
ENDIF.
IF fg_set = 'X'.
EXIT.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module fill_table_control OUTPUT
text
MODULE fill_table_control OUTPUT.
READ TABLE it_mara INTO it_mara1 INDEX tc1-current_line.
ENDMODULE. " fill_table_control OUTPUT
*& Module cancel INPUT
text
MODULE cancel INPUT.
LEAVE PROGRAM.
ENDMODULE. " cancel INPUT
*& Module read_table_control INPUT
text
MODULE read_table_control INPUT.
v_lines = sy-loopc .
it_mara1-lsel = lsel.
MODIFY it_mara FROM it_mara1 INDEX tc1-current_line.
ENDMODULE. " read_table_control INPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE user_command_0100 INPUT.
ok_code = sy-ucomm.
save_ok = ok_code.
CLEAR ok_code.
CASE save_ok.
WHEN 'NEXT_LINE'.
tc1-top_line = tc1-top_line + 1.
v_limit = v_fill - v_lines + 1.
IF tc1-top_line > v_limit.
tc1-top_line = v_limit.
ENDIF.
WHEN 'PREV_LINE'.
tc1-top_line = tc1-top_line - 1.
IF tc1-top_line < 0.
tc1-top_line = 0.
ENDIF.
WHEN 'NEXT_PAGE'.
tc1-top_line = tc1-top_line + v_lines.
v_limit = v_fill - v_lines + 1.
IF tc1-top_line > v_limit.
tc1-top_line = v_limit.
ENDIF.
WHEN 'PREV_PAGE'.
tc1-top_line = tc1-top_line - v_lines.
IF tc1-top_line < 0.
tc1-top_line = 0.
ENDIF.
WHEN 'LAST_PAGE'.
tc1-top_line = v_fill - v_lines + 1.
WHEN 'FIRST_PAGE'.
tc1-top_line = 0.
WHEN 'DELETE'.
READ TABLE tc1-cols INTO cols
WITH KEY screen-input = '1'.
IF sy-subrc = 0.
LOOP AT it_mara INTO it_mara1 WHERE lsel = 'X'.
DELETE it_mara.
fg_set = 'X'.
ENDLOOP.
ELSE.
fg_set = ''.
ENDIF.
WHEN 'INSERT'.
LOOP AT it_mara INTO it_mara1 WHERE lsel = 'X'.
INSERT INITIAL LINE INTO it_mara INDEX sy-tabix.
ENDLOOP.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE TO SCREEN 0.
WHEN 'JADOO'.
READ TABLE tc1-cols INTO cols
WITH KEY selected = 'X'.
IF sy-subrc = 0.
cols-invisible = '1'.
MODIFY tc1-cols FROM cols INDEX sy-tabix.
ENDIF.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT

Similar Messages

  • Screen painter or table control problem

    Hi All,
    I have created two maintenance views for two custom tables , and two views has been created .
    in one view when i excuting sm54 and display i could able to see all the fields in the table control ,
    but in the other view i could see only one field very in the table control.
    Is this the problem of screen painter with table control , shall i need to intall screen painter again
    i am using  4,7 version  os sap ,
    Regards
    subba

    Hi  Chandra,
    Thanks for yorr prompt reply  and i tried so many times , can i go that particular screen and change
    the screen and include all the fields , actually the system proposes the screen when we are creating
    the table maintenance generator.
    i selected one step and screen proposed by sap in the overview screen as  1 and i have created table maintenance.
    Regards
    subba

  • Screen Painter and Menu Painter Translations

    Hello All,
    I want to translate the Screen painter and Menu Painter Objects .
    When I go to the SE41 and select the PF Status of my Program and press change Button I'm getting the following msg :
    Make repairs in foreign namespaces only if they are urgent .
    If I press Ok and select the Menu path : Goto --> Translation .
    The Translation options is in deactivated mode.
    How to do the Translation now ?
    Regards,
    Deepu.K

    Hi
    Run trx SE63, then go to: Translation->Short Texts->Screen Painter
    Choose:
    - Header to translate the title of attribute of the screen;
    - Texts   to translate the label of the input/ouput fields
    Translation->Short Texts->User interface to translate the menu
    Max

  • Attaching search help to SCREEN FIELDS AND TABLE FIELDS

    Hello experts,
    Himanshu here.
    Could you please explain how we can assign search Help to a screen field AND TABLE FIELDS in ABAP?
    Please reply at the earliest,as we have some deliverables to be met
    Thanks

    Hi,
    In the initial screen of the ABAP Dictionary, select object class Search help, enter the name of the search help and choose Create.
    A dialog box appears in which you must select the type of search help.
    Select Collective search help and choose .
    The maintenance screen for collective search helps is displayed.
    Enter an explanatory text in the field Short text.
    You can for example find the search help at a later time using this short text.
    In the Definition tab page enter the parameters of the collective search help.
    Select the Imp flag if it is an import parameter. Select the Exp flag if it is an export parameter.
    Define the types for the parameters of a collective search help by assigning a data element. Enter the name of the data element that describes the contents of the search help parameter in the Data element field.
    You can assign the parameter a default value in the Default value field.
    In exceptions it could be necessary to change the standard process defined by the search help. You can implement the deviation from the standard using a search help exit.
    In this case enter the name of the search help exit in the corresponding field.
    On the Included search helps tab page, define the search helps that you want to include in the collective search help.
    You can include elementary search helps and collective search helps.
    Use the Hide flag to control whether an included search help should appear in the dialog box for selecting the elementary search help. If the flag is set, the search help is not offered.
    It makes sense to hide search help inclusions if one or more search paths in the standard system should not be used in a concrete R/3 System. Similarly, search help inclusions can also be already hidden in the standard system because they only can be used meaningfully in a few R/3 Systems. You have to cancel the flag in this case.
    Position the cursor one after the other on each allocated search help and choose Parameter assignment.
    In the next screen, enter the parameter names of the elementary search helps to which the corresponding parameters of the collective search help should be assigned in the field Reference parameter.
    You can select the parameters contained in the included search help using the input help. Create a proposal for the assignment with Proposal.
    Save your entries.
    A dialog box appears in which you have to assign a development class to the search help.
    Choose .
    Result
    The collective search help is activated. You can find information about the activation flow in the activation log, which you can display with Utilities ® Activation log. If errors occurred when the collective search help was activated, the activation log is automatically displayed.
    Do not forget to link the search help to a screen field. The search help attachment is not part of the search help definition; it is part of the object definition to which the search help is attached.
    regards,
    veeresh.

  • Screen Painter and SDK

    Hi,
    I've developed a form in the screen painter. I want to add the business logic from SDK. Is it possible...it should be right?
    I have a very complex form with around 20-25 edit boxes and one grid. The issues
    I have designed the form in the screen painter and am trying to access the edit boxes from SDK. the code snippets is like
    oForm = SBO_Application.Forms.GetFormByTypeAndCount("60004", 0)
    When i try to access it says form not found. sbo_appl.forms.activeform worked, but when i used
    oEdit = oForm.Items.Item("9").Specific
    in the next line, it says 9 is not a valid feild.

    Yes - this is what SP is about. You design your screen
    from SP and save it as an XML file. At this point you
    load it in B1 from your addon using the LoadBatchAction.
    You just need to change the FormID before loading it, this
    is an easy task: if you want some sample you can see the
    samples here in SDN or check the code of B1DE here on SDN
    too.
    Once it is loaded you can use all the UI SDK methods and
    properties to handle events and items in this form.

  • Difference between screen painter and module pool

    Hi guys,
    what's the difference between SCREEN PAINTER and MODULE POOL ....
    can anyone plz give brief description ...
    regards
    venu

    hi ,
        As its said by many colleagues in SDN , there are not very major differences between Modulepools and screen painter .
    The few differences are :
    1) <b>Module pool is nothing but a pool ( series ) of screens . and Screen painter ( SE51 ) is a tool used for creating/designing  screens .</b>
    2) <u>While creating a modulepool you even need to create a transaction and assign this module pool program else the mpool program doesnt work . I think this is place we can say they are different .</u>
    3) <b>If at all you create a screen in screen painter ( SE51 ) , that doesnot function by its own , you need to assign it to any of the executable programs or modulepool programs .Here is again a difference .</b>
    Regards,
    Ranjita ..
    Message was edited by:
            Ranjita Kar

  • Screen Painter and Matrix

    In screen painter I am unable to attach the folder with the respective matrix. Please give the complete method to attach the above mentioned.

    Hi Manish,
    I am not too sure what you want to know, but if you want a matrix to be displayed only on a specific folder you should do the following. I am going to show you the code, but you can do parts of it in screenpainter as well. In screen painter you cannot display it like you would at runtime.
    On your matrix you would set the PaneFrom and PaneTo properties. To only set it visible on the first folder:
            Dim oItem As SAPbouiCOM.Item
            Dim oForm As SAPbouiCOM.Form
            oForm = oApplication.Forms.ActiveForm
            oItem = oForm.Items.Item("My_Matrix")
            oItem.FromPane = 1
            oItem.ToPane = 1
    To add the folder you'll have to remember to set the ValOn and ValOff properties:
            Dim oFolder As SAPbouiCOM.Folder
            oFolder = oForm.Items.Item("My_Folder").Specific
            oFolder.Caption = "MyFolder"
            oFolder.DataBind.SetBound(True, "", "UDS_1")
            oFolder.ValOff = 0
            oFolder.ValOn = 1
    To invoke the folder's click event you have to code it manually:
    Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles oApplication.ItemEvent
            If pVal.FormTypeEx = "My_Form" Then
                If pVal.BeforeAction = True Then
                    If pVal.ItemUID = "My_Folder" Then
                        If pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED Then
                            Dim oForm As SAPbouiCOM.Form
                            oForm = oApplication.Forms.ActiveForm
                            oForm.PaneLevel = 1
                        End If
                    End If
                End If
            End If
        End Sub
    Hope it helps,
    Adele

  • Screen Painter and RFC connection issue

    Hello,
    I get the following error when I try to start screen painter:
    EU_SCRP_WN32 : timeout during allocate / CPIC-CALL: 'ThSAPCMRCV'
    I have installed all sapgui components and when I test the rfc connection it
    starts the program but then sends the same error.
    I think it's got something to do with the fact that I'm trying to start this
    program through a saprouter because when I start it locally (within my LAN)
    the program starts without problems.
    I have already applied latest kernel patch.
    Could you suggest what could I do to complete my RFC connection? Should I
    put something under gateway host or gateway service?
    Thanks in advance

    The issue here is that I don't know how to establish de gateway option
    considering I'm using saprouter to connect to sap system.
    Well... If you are asking how to "enable" gateway option then...
    You go to SM59 > Open EU_SCRP_WN32 > Go to "Technical Setting" tab
    Click on change option.
    Put the Gateway host IP address or Host name (SAP Server)  > Save
    Check the connection by "Connection Test" option.
    If any error... pls post here.

  • Screen Painter and existing forms

    Hi all,
    Is it possible to save one of the existing forms, for example, the item master form to an xml file that can be manipulated in the screen painter?  If it is possible, how would I do it?
    TIA,
    Steve

    Hey Ram,
    You will have to handle the click on the choose from list button (not sure of the item ID, use the debug information and mouse over to find it). You will also have to handle the key down tab event (CHAR = 9) and open your form as well.
    To stop business one from handling these events you will have to do it on the before and set bubblevent = false

  • Screen Painter and FMS

    Hi all,
    I have developed a form with Screen Painter. In a field I attached an FMS. Although the FMS works perfect when I choose the value it is not paste in the specific field.
    Any Idea,
    Thanks in advance,
    Vangelis

    Hi Vangelis,
    If there is I don't know about it, but I also never tried it.
    Is some cases I've emulated the CFL behavior with the following steps.
    1. Catch the Validate event ;
    2. If the Key Pressed to exit the field is the TAB key, open a form - lets call it CFLForm - with the possible values;
    3. Catch the double-click event or the "Select" button pressed event
    4. Write the value if the base form's field and close the CFLForm form.
    Regards,
    Vítor Viera

  • Screen painter and database connectivity

    hi friends where i can found the complete tutorial for the screen painter , coding part and all stuf that is required for designing screen and then using it.
    i have searched a lot but stil not getting proper links.

    [http://abaplovers.blogspot.com/2008/03/sap-abap-module-pool-programming.html]

  • Screen Painter and pf status

    hi experts...
    I want to create my own screen for my program...please guide me how to create and what is pf status and its use...

    Hi Sugumar
    For creating your own screen.. Just follow the under mentioned steps
    Just write
    <b>CALL SCREEN XXX   ( in SE38 Editor)</b>
    then double click on the XXX ( screen number which you have specified )
    It'll take you to the next screen where you you will see the following set of statements
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    YOu just have to de comment the above mentioned statements.
    Then  double click on
    MODULE STATUS_0100
    MODULE USER_COMMAND_0100  respectively.
    It will generate a code in se38 editor like this
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    MODULE USER_COMMAND_0100 INPUT.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    Then you just have to punch in the logic as desired.
    <b>Regarding  *  SET PF-STATUS 'xxxxxxxx'</b>
    The purpose of this statemnt is to provide icons/ functions on application toolbar and menu toolbar at the o/p screen.
    This is how we do it :
    just provide a name to XXXX by decommenting it
    for example   SET PF-STATUS 'ZITP_GV_ALV_GRID'.
    Then double click on "'ZITP_GV_ALV_GRID'"
    it will take you to the next screen.
    On that screen  you just ahve to provide the
    icons / functions which you want on your application and menu toolbar respectively..
    so that you can use them while you are seeing the O/P of your program.
    one eg :
    MODULE USER_COMMAND_0100 INPUT.
    IF SY-UCOMM = 'EXIT'.
      LEAVE PROGRAM.
    ENDIF.
    ENDMODULE. 
    This exit button is there on menu toolbar
    SO when you will press exit on the menu toolbar ( ^^^ the code wil be executed and it'll take you bac to se38 editor)
    I hope this information helps !!
    Regards
    Gaurav
    Message was edited by:
            Gaurav Verma

  • Screen painter, ChooseFromList and et_EDIT

    Hi,
    I'm in Screen Painter and I did set a it_EDIT with a ChooseFromList Business Partner.
    When I hit PREVIEW, it works fine,  the list of Business Partners appear and I choose one but the choosen one do not go in the et_EDIT textbox.
    I don't understand the Aliases because the help do not let me understand what it is and there's no way to see by a demo or anything else so I can understand clearly. 
    First is this all possible just by the Screen Painter or I do need to code something else ?  Any video tutorials ? Anything could help understand how to make it work.
    I beg anyone to give me a working solution.
    Thank you
    Edited by: Marc Roussel on Dec 20, 2010 3:16 PM

    Just a mall thing.  Everything seems to work except that when I did choose the BP, a message pop saying :
    "Item - Can't set value on item because the item can't get focus. [66000-153]"
    However once I clicked OK of that message, I see my choosen BP in my EditText and everything is fine so I don't understand why I receive this message.  Here's the code I use
    if (pVal.EventType != SAPbouiCOM.BoEventTypes.et_FORM_ACTIVATE && pVal.EventType != SAPbouiCOM.BoEventTypes.et_FORM_LOAD)
        if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST)
            SAPbouiCOM.IChooseFromListEvent oCFLEvento = null;
            oCFLEvento = ((SAPbouiCOM.IChooseFromListEvent)(pVal));
            string sCFL_ID = null;
            sCFL_ID = oCFLEvento.ChooseFromListUID;
            SAPbouiCOM.Form oForm = null;
            oForm = SBO_Application.Forms.Item(FormUID);
            SAPbouiCOM.ChooseFromList oCFL = null;
            oCFL = oForm.ChooseFromLists.Item(sCFL_ID);
            if (oCFLEvento.BeforeAction == false)
                SAPbouiCOM.DataTable oDataTable = null;
                oDataTable = oCFLEvento.SelectedObjects;
                string val = System.Convert.ToString(oDataTable.GetValue(0, 0));
                if ((pVal.ItemUID == "it_BPCode") && pVal.ActionSuccess)
                    ((SAPbouiCOM.EditText)oForm.Items.Item("it_BPCode").Specific).Value = val;

  • Regarding the flow logic in screen painter

    Hi Experts
    I am a BW guy and i am new to ABAP and i need your help to solve my problem.
    I have created a table for master data(zemp_data) in R/3 se11..which has fields like zempid,zempname,zmgrid,zdeptid,zdeptname and i have created the respective fields in screen painter too but my problem is i dont know how to link this fields  in the screen painter to the  fields in table .to be more clear i want the flow logic or module pool code to link this table when i give an entry in the screen painter for the respective  fields..i will really appreciate your answers and award the maximum points for the usefull answer ..as i dont know ABAP much if it is a step by step approach ..that would be helpfull
    Regards,
    RK.

    Hi Karthik,
    Please consider the following
    In the screen...the fields must be from the database table in Se11..(in screen painter -> use.."get from Dictionary" -> enter the table name -> select the fields -> drag and drop on the screen) or must have the same name in the database table..This will be a link but unless you code to fetch values from database or update values to database there will be no action taking place
    Usually in the PBO(process befor output) we write the code to display values before we accept data from the user ie,set default values on the screen if required and prepare the screen for user input
    in the PAI of the screen painter we can do data processing ie, data validations,checks and saving based on what the user wants
    So imagine you have buttons placed on the screen and there are buttons from standard application bar like BACK,SAVE, set using PFstatus..all the user actions will be linked to a function cod..ie whenever user presses a button we can uniquely idntify what was pressed by assigning a function code to each button in the menu painter or PF status and do the action accordingly
    Assume that you have created a push button on the screen painter and assigned it a function code "PUSH"
    so whenever you press the button in the variable sy-ucomm "PUSH" will be captured..this you can check in PAI for the screen like
    Case sy-ucomm.
    when 'PUSH'.
    do the needful coding
    when 'SAVE'
    Modify database table
    endcase.
    you can check the standard demo programs in SE38 -> program name-> display for basic ABAP coding you have asked for
    (1)demo_dynpro_input_output .
    (2)demo_dynpro_dictionary
    (3)demo_dynpro_push_button
    Pls let us know if you need more help on the same
    Reward if helpful
    Regards
    Byju

  • Update column in screen painter

    i have column in screen painter and i write data when i make enter it's dissapear why???

    Did you have corresponding data object defined in program?
    I guess this is where the issue comes from. Simply system can't exchange data b/w screen and program.
    Try declaring one, it should help then.
    Also, what do you mean by column ? If it is a table control you need to use definition of this table, the simplest is usually by
    TABLES name_of_table.
    If this is a single field taken as reference from DDIC you should simply define it like
    DATA name_of_table-name_of_column TYPE name_of_table-name_of_column.
    Regards
    Marcin

Maybe you are looking for

  • HT1338 how can i update to latest display driver

    how can i update to latest display driver i hv mini mac with i5 8gb

  • Question on time taken to insert

    I would like to find the time that took to run this query. Can anyone help me to do this. Thanks in advance INSERT INTO tableB(SELECT * FROM tableA)

  • NO ACCOUNTING DOC in GI

    Created Sales Order (SO) with ItCat = TAB PR is created in SO. Created Purc Req (PR) Created Purc Ord (PO) Acnt Assign Cat = M GBB VKA = A Goods Receipt NO PROBLEM debit A credit GRIR Account Goods Issued Material Document created BUT NO ACCOUNTING D

  • Parsing e-mails

    Hi Guys, I'm trying to figure out a simple way to use regex (or any other alternative) to parse e-mails from a text file... let's say I have a text file, "something test [email protected] more test and now another [email protected] and that's it" Any

  • Automated mail function for sales order acknowledgement

    Hi Friends, We have a requirement for automated functionality for sending mail to the sold to customers when the order is first saved. We already have a customer program to convert into PDF and mail directly. But this is to automatically send the mai