Programe Dump Issue in Module Pool

Hi,
I am working on screen programe (Module Pool ). i created module user_command_2000 input   for screen 2000.
I used  Case statements .
When 'Print'
perform print_Page.
Form Print_page includes a report which is another programe  , which is having write statements.
when control comes to write statement   in  Form Print_page .
It gives dump.
Description is :
ist line "-1" not found.
I have to call a TYPe 1 Programe ...

PROGRAM ZSRN_SAMPLE2.
call screen 100.
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
case sy-ucomm .
when 'PRI'
perform myform.
endcase.
ENDMODULE.
FORM MYFORM .
data: l_var(20) type c.
        l_var  =  '6'.
export  l_var to memory id 'BB'.
submit ZSRMYFORMS1.
ENDFORM.
the below program is type 1 (excutable program)
REPORT ZSRMYFORMS1.
data:l_var(20) type c.
         import  l_var from memory id 'BB'.
write : l_var.
write: 'hi'.

Similar Messages

  • Checkbox issue in module pool program

    Hi all,
    I have a small issue in a module pool program using checkboxes. The requirement is that my basic list should contain the data with checkboxes and as per the selection by the user, the selected records should appear in the next screen (secondary list). But after selection, all the records barring the last record is appearing in my secondary list. Below are the screenshots of my program:
    These are the global variables I declared:
    The layout for the  basic list is as shown. The function code is cbox for checkbox.
    The flow logic :
    The code for user-command:
    Now on executing the program,
    As you can see, sales orders 4970,4972,4974 and 4975 are selected. So after clicking NEXT, in the secondary list , the data for these selected sales orders from VBAP table should come up. But instead, the records from 4970, 4972 and 4974 are displayed except the last sales order which is 4975.
    This is happening for all the records. The last selected sales order is not getting selected. Why is it so?
    Thanks.
    Manish

    Hi Ali,
    I have modified the code but there are still a couple of things which are confusing me. In the below screenshot you can see the modified version of the code:
    Now to see what is going wrong, I tried to debug the code. I placed the breakpoint on 'NEXT' as shown. Then I selected the following sales orders and pressed NEXT.
    In the debugger, IT_VBAK1 correctly holds the 2 selected values:
    IT_VBAP displays the values correctly as well.
    Now, this is where the issue is. On clicking the BACK button and selecting another sales order (4974):
    IT_VBAK1 holds the additional sales order 4974 along with the previous ones as well:
    IT_VBAP also displays the values accordingly as per the debugger:
    But in the table control, the sales order 4974 is not displayed. Only the initial sales orders are displayed.
    1) There is nothing wrong with the code as the debugger shows the records are held and displayed correctly by the internal tables. So what could be the reason for the data not to be displayed correctly in the table control? I also tried refreshing IT_VBAP after the BACK button, but still it isnt working. 
    2) Also, another thing I've seen that is after clicking the BACK button, when I select the sales orders, only data from 2 sales orders are displayed in the secondary list.
    For example, if I select any number of sales orders and press NEXT, then all the data are displayed correctly in the secondary list. Once I click the BACK button and deselect all of them and then I checkbox 3 sales orders (more than 2), then only the records for 2 sales orders are displayed, not the 3rd one.   Why is this happening?
    Regards
    Manish.

  • Checkbox positioning issue in module pool program screen

    Hello All,
    I am facing one issue with the checkbox positioning in module pool program.I have designed the screen in 'SAP Signature Theme' and the checkbox position looks fine (while tested the screen in SE80) as shown below.
    Test Result from 'SAP Signature Theme':
    But the lead has a different theme in his SAP system and he got the below result where the checkbox automatically shifts right with the same code and screen design as shown below.
    Test Result from'Enjoy'  theme :
    Could you please help me resolve this strange issue as soon as possible.
    Thanks in advance!!!
    Thanks & Regards,
    Hafizul

    Hi Bhaskar,
    Sure , in fact this is has been created by dragging and dropping of the the standard checkbox template availabe in the layout,no custom code has been written for this.
    Please find the layout properties for this checkbox below.
    P9021-COMPLI_CONF is one character field.
    Please let me know if you need any other details on the same.
    Thanks & Regards,
    Hafizul

  • Selection screen regeneration issue in Module pool

    Hi experts,
    I have designed a module pool in which i have included a selection screen as sub screen , and for the scenario i need to give custom f4 help for the selection  field for that i have included logic ,My issue is when ever i am changing other code in the programs (other screen logic) the selection screen  is reverting back to normal ...again i have to do the flow logic and screen change of selection screen.
    Suggest me how i can avoid this .
    Regards,
    Siva Prasad.

    and for the scenario i need to give custom f4 help for the selection  field for that i have included logic
    was the error, use some AT SELECTION-SCREEN ON VALUE-REQUEST FOR {para|selcrit-low|selcrit-high} or PARAMETERS/SELECT-OPTIONS MATCHCODE OBJECT search_help  statement, and your problem will vanish... (Edition of a generated object is hardly ever a good idea and never good practice)
    Regards,
    Raymond

  • General issue in module pool

    I am working on dialog program.
    i have a provide a f4 value for one of the field.
    lats say i have two fields field A
                               field B
    I have to provide f4 help fir field B.
    I have a ztable which have field A and field B .
    FIELD A is primary key.
    based on my input for field A i have to retrieve values FROM ZTABLE FOR FIELD B
    I HAVE DONE THE SAME.
    WHEN I ENTER VALUE FOR FIELD A and then f4 for field B IAM NOT ABLE TO RETRIEVE ANY VALUES BECAUSE
    process on value-request.
    FIELD ZTEST-A MODULE VALUE_REQUEST.
    SELECT * INTO TABLE ITAB FROM ZTEST
                      WHERE A = ZTEST-A.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
      DDIC_STRUCTURE         = ' '
        RETFIELD               = 'B'
      PVALKEY                = ' '
      DYNPPROG               = ' '
      DYNPNR                 = ' '
      DYNPROFIELD            = ' '
      STEPL                  = 0
        WINDOW_TITLE           = 'TEST'
      VALUE                  = ' '
        VALUE_ORG              = 'S'
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = ' '
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      TABLES
        VALUE_TAB              = ITAB
      FIELD_TAB              =
        RETURN_TAB             = IT_RETURN
      DYNPFLD_MAPPING        =
    EXCEPTIONS
      PARAMETER_ERROR        = 1
      NO_VALUES_FOUND        = 2
      OTHERS                 = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    WHEN I PRESS F4 FOR FIELD B ,MY FIELD A IS INITIAL.
    AFTER GIVING FIELD A VALUE AND THEN PRESS ENTER AND THEN PRESS F4 FOR FIELD B THEN IT WORKS FINE.
    BUT THE USER DON'T WANT TO PRESS ENTER AFTER GIVING VALUE FOR  FIELD A.
    I ALSO WANT TO KNOW, IF I PRESS F4 DOES THE CONTROL DIRECTLY GOES TO POV OR DOES IT GOES THROUGH PAI AND THEN TO POV.
    Any lead or suggestings in achieving this would be great
    Thanks
    venki

    hi,
    *-            A T   S E L E C T I O N   S C R E E N  --- Value Request
    *--F4 help for INPIT files
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_PCFILE.
      PERFORM VALUE_REQUEST_FOR_PC_FILE USING P_PCFILE.
    FORM VALUE_REQUEST_FOR_PC_FILE  USING    P_PCFILE.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          PROGRAM_NAME  = SYST-CPROG
          DYNPRO_NUMBER = SYST-DYNNR
          FIELD_NAME    = ' '
        IMPORTING
          FILE_NAME     = P_PCFILE.

  • Table Control Scrolling issue in Module Pool

    Hi,
    I've done table control. From Selection screen i've 3 buttons, if we'll press on one button one table control is visible. There if i do scrolling up to 10 records and i come back to selection and press another button again in table control scrolling is at previous place only. May be its nt refreshing.
    Kinldy help on this issue.
    With Regards,
    jack.

    hi,
    i've done like below. But no result.

  • CURRENCY FIELD IN TABLE CONTROLLS OF MODULE POOL PROGRAM

    Hi All.
    I am fasing an issue in module pool.
    I am using a table controll to display the data on the screen.
    There is  one field of currency type .
    the amount in that field is -ve(Negative) then the program giving a short dump by saying that the problem is  in the conversion.
    if the field is + ve(means  no sign) it's executing fine.
    Can any body help me to solve this issue,
    Thanks in advance,
    regards,
    venkat

    Hi Venkat,
    Open the screen painter (SE51) and go to the currency field in the table control on the screen. In the "TEXT" field in the toolbar, delete a character (_) and type in "V" as the last character. The issue should be solved.
    Regards,
    Manoj

  • Issue With Search Help in Module Pool

    Dear All,
    I have an Issue with Search help. I have created a Module Pool Program. In this module pool, User requires the search helps for the fields.
    Imagine there are 3 fields on a screen. Field1, field2 and field3.
    Field2 entries depends on field1 and field3 entries depends on field1 and field2.
    I have created a collective search help. and created the corresponding Ztables to maintain the search help entries.
    Now I assigned the same collective search help to both the fields . i.e. field2 and field3. But when i execute the module pool program, and press F4 on these fields , the data shown is write. BUT for the 3rd field, when I select F4, The second field values are transfered to the screen, instead of third field value.
    Any Idea will be appreciated .
    Help me , Its very Urgent.
    Regards,

    Did you check the screen field names & search help name? is it identical & unique?
    Raja T

  • Table controlls in module pool programming

    Hi all.
    I have an issue in module pool program.
    I created a table controll in the screen through table controll wizard.
    In that if I enter the data for 10 records(more than 1),then I(pressed)clicked on ENTER . then only first record is staying in the table controll.all other recods are
    going(disappering) from the table controll.
    Can any body help me to solve this problem.
    Thanks in Advance,
    Regards.
    Eswar

    you are not storing the entries given in the table control.
    i can give you an idea.
    declare an internal table which has the same structure as of the table control.
    in the PAI event, refresh the internal talbe.
    loop at the table control. move all the entries of the table control to the internal table.
    in the PBO event, refresh the table control. count the number of lines in table control. insert all the lines of internal table to the table control one after another.
    hope this helps you.
    thanks
    pavan

  • HOw to find Report program associated module pool program?

    HOw to find Report program associated module pool program?
    I.e
    Me21n is the tcode.I want to find screens related to this tcode.
    Associated report program is RM_MEPO_GUI.(It has no screens hence it is a report program).
    (if module program is attached to tcode,i can easily find entries in d020s)
    Here  report program is calling a module pool program SAPLMEGUI(Has screens).
    If i give the Tcode Me21n,i want to list out all the screens of it..
    Can u give any suggestion....

    Hi Sampath.
    Manually i can see it (by seeing in system-status)..
    programmatically i want to know..
    for ex:if u take  Tcode:Va01
    we can get program (dialog)  and tcode in Tstc table .
    If we know the program name(dialog), we can find program and screens in d020s table.
    Va01 is atatched to a module pool program..No problem to find screens..
    In case of me21n,
    It is atatched to report program(calling module pool program)..
    Here i could not be able to get the screens ..
    I think u undrstood my problem..

  • How to write module pool program

    hai,
    what is the module -pool program ?
    what are the procedures to write the module-pool program.
    plz give the simple program for module-pool programs?
    regards
    surender

    Hi
    This component though is not attached to the screen painter, plays important role in transaction. Normally, for reports, on line executable programs are written but for transaction, Module Pool Programs are written. The module pool program contains only modules to handle various events associated with screen and data declaration statements.
    System divides the module pool program into several include program. These are global field, PBO modules, and PAI modules. It is entirely user’s decision whether to use these modules or write directly into main program.
    Creation of Module Pool Program
    You can create module pool program either through
    Object browser
    System automatically creates the module pool program and for these program which are created through object browser, system creates the include modules.
    Or
    ABAP/4 editor
    It is similar to normal program creation. Type of program should be given ‘M’ and is not created by system.
    Communication between Dynpro and Module Program
    For each screen, the system executes the flow logic, which contains corresponding events. The control is passed to Module Pool Program. Module Pool Program handles the code for these events and again passes back control to the flow logic and finally to screen. Unlike on line program, in this case, the control remains with flow logic. The switching of control between flow logic and module pool program and back is common process when user executes transaction.
    Creation of a Complete Transaction
    Steps involved to create a complete transaction
    •     Create module pool program.
    •     From screen painter create screens.
    •     Write flow logic for each screen.
    •     Write code for all the events in module pool program.
    •     Check for any error in screen and flow logic.
    •     Generate each and every component of screen i.e. flow logic and screen.
    •     Single screen can be tested using Screen Painter.
    •     Create transaction code through object browser.
    •     Generate the transaction code.
    •     User can execute the transaction by entering the transaction code in the command field.
    Handling Function Code
    The function code or OKCODE is the last field of Field list. Function code can be handled as follows:
    During the Designing of the screen, a function code is assigned to pushbutton.
    •     In field list, developer needs to specify OKCODE as last field.
    •     In module program it is a global field and can be evaluated in the PAI event.
    •     A function code is treated in the same way, regardless it comes from pushbutton, menu item or any other GUI element.
    When the user clicks on the Display button, you want to display details of sflight, with corresponding carrid and connid (which is entered by the user).
    Module pool program to handle this particular screen is as follows:
    Program YVTEST7.
    TABLES: SFLIGHT.
    DATA: OKCODE (4).
    MODULE INPUT1 INPUT,
    CASE OKCODE.
       WHEN ‘DISP’.
         SELECT * FROM SFLIGHT
                WHERE CARRID =  SFLIGHT – CARRID AND
                               CONNID = SFLIGHT – CONNID.
         ENDSELECT.
         LEAVE TO SCREEN 200.
       WHEN ‘EXIT’.  LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.               “INPUT1 INPUT
    MODULE USER_COMMAND_0200 INPUT.
    CASE OKCODE.
    WHEN ‘BACK’. LEAVE TO SCREEN 100.
    ENDCASE.
    ENDMODULE.                    “USER_COMMAND_0200 INPUT
    When the user clicks on display, control is transferred to screen no. 200 on which you display sflight details & on the same screen, when user clicks on BACK button, he comes back to main screen.
    Flow logic for screen 100 is as follows:
    PROCESS AFTER INPUT.
    MODULE INPUT.
    Flow logic for screen 200
    PROCESS AFTER INPUT.
    USER_COMMAND_0200.
    MODULES: Modules are handled in module pool program.
    You need to write flow logic for screen 200 and design screen 200.
    In case of transaction transfer of data from program to screen is automatic i.e. you need not transfer the data from program to screen explicitly. The fields, which you define in the screen receives the data from program and displays the same.
    The Field Checks
    As already mentioned Transaction is the only method, which SAP recommends to update the database tables. Data entered in the database table should be valid and correct. Data entered is validated at each and every point. ABAP/4 offers various methods to validate data and those are as follows:
    •     Automatic field checks
    •     Checks performed in the flow logic
    •     Checks performed in the ABAP/4 module pool program
    Automatic Field Checks
    These checks are based on the field information stored in the dictionary. These checks are performed by the system automatically when the user enters the data for the screen field. System performs these checks before PAI event is triggered. Types of field checks performed by system are as follows:
    •     Required input
    While designing the screen, for particular screen field if you click the Req. Entry checkbox, the field becomes mandatory. When the transaction is executed if user leaves this particular field blank, the system displays error message. User cannot proceed until the user enters some data.
    •     Proper Data Format
    Each field has its own data format whether it is table field or screen field. Whenever data is entered, system checks for the proper format of the data. For example date. Each user has its own format for date, which is defined in the user master record. If the date defined in the user master record is in the format DD/MM/YYYY, if the user enters the date, say, in YY/DD/MM, the user displays the error message. System also checks for the value of month or days. For example if month entered is greater than twelve then the error message is displayed.
    •     Valid Value for the Field
    In data dictionary two tables are related by Primary key-Foreign key relationship.  Whenever the user enters the data, the system checks for the check table values.   Also in Domain, if you have fixed values, then the system checks for these values.
    Automatic field checks are repeated each time the user enters the data.
    About at Exit – Command
    Automatic field checks can be avoided by AT EXIT-COMMAND, which works exactly the same way as Cancel works on application tools bar. In the R/3 screen, if you want to quit the processing of that particular screen without entering the mandatory fields, user can click the Cancel button. Same functionality can be incorporated in the user-defined transaction by using AT EXIT-COMMAND. This module can be called before the system executes the automatic field checks and it goes without saying that before PAI event. Code for AT EXIT-COMMAND in flow logic and in module pool program can be written as follows:
    In Flow Logic
    Process After Input.
    Module exit AT EXIT-COMMAND.
             In module pool program.
    Module exit.
    Case okcode.
    When ‘Exit’.
    Leave to screen 0.
    To achieve this kind of functionality a pushbutton or menu item should be assigned a function type ‘E’. It tells the system to process this particular module before carrying out any field checks.
    Flow Logic Validations
    Consider the case where you want user to enter only ‘LH’ and ‘SQ’ for sflight-carrid. In this case, you are restricting value of a screen field. This cannot be achieved by automatic field check. Hence there is a need of additional validation. It can be done in flow logic by using following statement:
    Field -
    Values
    Syntax
    PAI.
    Field sflight-carrid values (‘LH’).
    For multiple values
    PAI.
    Field sflight-carrid values (‘LH’ ‘SQ’).
    Field sflight-price values (between 1000 and 2000).
    In this case when the user enters the value, PAI is triggered  and field is checked for  that particular value. If the value entered happens to be wrong, that field is enabled for user to enter. If you have multiple Field statements in your flow logic, it is sequential execution.
    Consider the following case:
    PAI.
    Module  assign.
    Field sflight-carrid values (‘LH’ ‘SQ’).
    In ABAP/4
    Module  assign.
    Data: carrid1 like sflight-carrid.
    Carrid1 = sflight-carrid.
    Endmodule.
    In this case, Sflight-carrid is used in the flow logic before the field statement. The system will give invalid value or some previous value as the field sflight-carrid is used in module before it is checked i.e., field statement is after the module in which sflight-carrid is being used. The field is not available to the system unless it executes the field statement. Field statement transfers the values to the program and is done only once. If you don’t have Field statement in your flow logic, transfer of values takes place in PAI event.
    Consider one more case where you have multiple field statement
    PAI.
    Field Sflight-carrid values (‘LH’).
    Field Sflight-connid values (‘0400’ ‘0500’).
    In this case if the user enters only carrid wrong, then this particular field is enabled and rest of the fields are disabled for user to input. Many times if the user enters wrong value for one field, then you might want to give option to user to enter all the fields, which is not possible by using Field statement only. This functionality can be achieved by CHAIN – ENDCHAIN.
    Syntax
    Chain.
    Field sflight-carrid value (‘LH’).
         Field sflight-connid values (between ‘200’ and ‘500’).
    Endchain.
    Field sflight-price values (‘100’ ‘1000’).
    In this case, if the user enters wrong value only for carrid, both the fields i.e. carrid and connid are enabled as they are grouped together in the Chain statement. The field price will be disabled for input. Usually, logically related fields are grouped together with Chain-Endchain statement.
    Module Pool Program Validations
    Checking fields ABAP/4 program includes
    •     Field statement in flow logic.
    •     Module statement in ABAP/4 module pool Program.
    Syntax
    PAI.
    Field sflight-carrid module <name>.
    This module can be handled in the main program i.e. module pool program.
    In ABAP/4 program
    Module Check.
    Select single * from sflight where carrid = sflight-carrid.
    If sy-subrc ne 0.
         Message e001.
    Endif.
    In this case, field sflight-carrid is checked in the table for its existence.
    Dynamically Calling the Screens
    About Displaying Next Screen
    Transaction is a sequence of screens, which are displayed one after the other. The next screen displayed depends upon the attributes of first screen. In attributes you need to give Next Screen number i.e. if next screen displayed should be 200 screen, then this number should be given in next Screen attributes. These are static attributes of the screen. By default, if nothing is specified in the program, the system branches out to the screen number, which is specified in the attribute screen.
    In this case, if user selects MARA pushbutton, then fields from Mara table are displayed. When the user clicks on the MARD, then the fields from MARD table are displayed. Depending upon users selection, the screen is branched out and this has to be done during runtime. This functionality can be achieved by dynamically calling the screen in module pool program.
    The screen can branch out to new screen depending upon user selection. Following command in module pool program can do this:
    •     SET SCREEM
    •     CALL SCREEN
    •     LEAVE TO SCREEN <NUMBER>
    All these commands override the specifications given in the attributes. This overriding is temporary. The values stored in the attribute are not changed.
    Set Screen
    Syntax
    Set screen <number>.
    In module pool program
    Case okcode.
         When  ‘DISP’.
              Set screen 200.
         When ‘LIST’.
              Set screen 300.
    Endcase.
    In this case, the entire processing of current screen takes place and then the system branches out to next screen. If you want to branch out to the next screen without processing the current screen, LEAVE SCREEN should be used along with the SET SCREEN.
    For Example:
    Case okcode..
         When  ‘DISP’.
              Set screen 200.
              Leave Screen.
         When ‘LIST’.
              Set screen 300.
              Leave Screen.
    Endcase.
    When SET SCREEN is used, control cannot be transferred to the main screen or previous screen, unless you write code for the same.
    Call Screen
    Usually used for pop up screens. Many times, there is a need for user to enter additional information or secondary information on another screen or pop up screen. Once the user enters the data, he should be able to go back to main screen or to the screen where he started. This is not possible by using SET SCREEN. CALL SCREEN achieves this functionality.
    Syntax
    Call Screen 200.
    Will simply call a screen number 200 from a main screen. Once the screen is displayed the user can enter all the data and return to the main screen by clicking BACK button.
    To call screen as pop up screen the syntax is
    Call screen starting at <col.no.> <line no>
                         Ending at <col no> <line no>.
    In this case window will be popped as window and user can close it by using BACK button.
    Leave to screen
    To SET a new screen without processing current screen, you need to use the following two statements together:
    SET SCREEN 200.
    LEAVE SCREEN.
    Or a Single statement
    LEAVE TO SCREEN 200.

  • Module pool with table controlls

    Hi all.
    I have an  Issue in module pool program.
    I am developing it to update a d/b table.in that I have
    a total of 40 fields are there.in those 10 are to be entered and save.
    I am using table controlls.Can any body help me to solve
    1.the manual entry fields are date fields.I am getting those from my internal table.I want f4 help for those date filds.it is not comming here.
    but in the d/b table fot that corresponding field it is comming.
    2.in the attributes of the table controll ,it is giving the option to freeze the number of columns.but this numbering is from left to right.
    but I want to freeze coloumns in between.
    is it possible.
    3.can any body tell me the logic for table controll to update the d/b table.Because there is no row selection(left side pushbuttons to the table controll).
    how to capture the data what I entered in the rows.
    Thanks in advance,
    Regards,
    Eswar

    venkat,
    We cannot freeze the columns in the middle.
    Check for F4 what attribute is set for the field in screen layout. ( field attributes programs tab->Poss. entries)
    Refer this example for tablecontrol
    http://www.sappoint.com/abap/dptc1.pdf
    Regds
    Man

  • Module Pool Error handling

    Hi friends,
    This issue regarding Module Pool Error Handling
    How to handle the multiple error on the same screen ,
    For example in the below code you could see "Carrid is Invalid"  when carrid is entred wrongly
    "in the same way i also need " Connid is invalid" When the customer entres the wrong Connid
    *Select single * from sflight into e_sflight*
    where carrid = e_sflight-carrid AND
    connid = e_sflight-connid AND
    fldate = e_sflight-fldate.
    IF NOT sy-subrc IS INITIAL.
    MESSAGE ID 'ZADT' TYPE 'E'
    NUMBER '002' WITH 'Carrid is invalid'.
    Kindly let me know your feedback\
    Thank you
    Sandy

    Hi Sandy,
    in PAI. " Also try to close your Questions as currently 8 out of 8 are unresolved
    Chain. " For More info take F1 help on this Key word
    field : carrid, connid. " These are the Screen Field names
    module validate on chain-request.
    endchain.
    in Program.
    module validate.
    select single carrid into carrid
         from scarr
          where carrid = carrid.
    if sy-subrc = 0.
    select single connid into connid
              from sflight
              where connid = connid,
    if sy-subrc NE 0.
    message 'Enter Valid Connid' type 'E'.
    endif.
    else.
    message 'Enter Valid Carrid' type 'E'.
    endif.
    endmodule.
    Cheerz
    Ram
    Edited by: Ramchander Krishnamraju on Apr 12, 2010 11:48 AM

  • Modul Pool Screen

    Hi all,
    I am facing an issue in module pool.
    I have a screen in which all fields are mandatory. the issue is when I press Back button the system gives "Fill in all required fields". In this case this should not happen. If I have inserted any value and then press back button then if system gives this message , then it s okay.
    But If I have not inserted any value and I press back button then , it should allow me to go back.
    So does anyone having idea how to do this?

    Sample code:
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
    PROCESS AFTER
    INPUT.
      MODULE leave_100 AT EXIT-COMMAND.   MODULE user_command_0100.
    DATA: ok_code TYPE sy-ucomm,
    MODULE status_0100
    OUTPUT.
      SET PF-STATUS 'STATUS_0100'.
    ENDMODULE.  
    MODULE
    leave_100 INPUT.
      CASE ok_code.
        WHEN 'BACK'.
        WHEN 'CANCEL'.
        WHEN 'EXIT'.  
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.

  • PICTURE ON  A  MODULE POOL SCREEN

    Hi All.
    I have an issue in module pool program.
    I designed a screen with number 100.
    on this screen they want to put some picture...like some logo.
    Is it possible to put the picture on this screen 0100.
    Please can any body ,help me to solve this issue.
    Thanks in advance,
    Regards,
    Eswar.

    Hello,
    You can use picture control to attach a picture to your screen.The sample code is below:
    The custom container in the screen layout is named as 'CONTAINER'.
    REPORT SAMPLE.
    DATA: picture type ref to cl_gui_picture,
    cont type ref to cl_gui_custom_container.
    DATA: I_EVENTS TYPE CNTL_SIMPLE_EVENTS,
    WA_EVENTS TYPE CNTL_SIMPLE_EVENT,
    OK_CODE TYPE SY-UCOMM,
    p_url type cndp_url.
    Class click definition.
    PUBLIC SECTION.
    METHODS: click_handle for event picture_click of cl_gui_picture
    importing MOUSE_POS_X MOUSE_POS_Y.
    endclass.
    DATA: click_variable type ref to click.
    class click implementation.
    method click_handle.
    DATA: X_POS(5),Y_POS(5).
    X_POS = MOUSE_POS_X.
    Y_POS = MOUSE_POS_Y.
    MESSAGE I000(OK) WITH 'Picture Click' X_POS Y_POS.
    endmethod.
    endclass.
    START-OF-SELECTION.
    call screen 100.
    *& Module STATUS_0100 OUTPUT
    text
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'GUI'.
    SET TITLEBAR 'xxx'.
    if cont is initial.
    CREATE OBJECT CONT
    EXPORTING
    CONTAINER_NAME = 'CONTAINER'.
    CREATE OBJECT PICTURE
    EXPORTING
    LIFETIME =
    SHELLSTYLE =
    PARENT = cont
    NAME =
    EXCEPTIONS
    ERROR = 1
    others = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    wa_events-EVENTID = picture->EVENTID_PICTURE_CLICK.
    wa_events-APPL_EVENT = 'X'.
    append wa_events to i_events.
    CALL METHOD PICTURE->SET_REGISTERED_EVENTS
    EXPORTING
    EVENTS = i_events.
    create object click_variable.
    set handler click_variable->click_handle for picture.
    CALL METHOD PICTURE->SET_3D_BORDER
    EXPORTING
    BORDER = 1.
    CALL FUNCTION 'DP_PUBLISH_WWW_URL'
    EXPORTING
    OBJID = 'HTMLCNTL_TESTHTM2_SAP_AG'
    LIFETIME = cndp_lifetime_transaction
    IMPORTING
    URL = p_url
    IF SY-SUBRC = 0.
    CALL METHOD PICTURE->LOAD_PICTURE_FROM_URL_ASYNC
    EXPORTING
    URL = p_url.
    ENDIF.
    endif.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Module USER_COMMAND_0100 INPUT
    text
    MODULE USER_COMMAND_0100 INPUT.
    CASE OK_CODE.
    WHEN 'BACK'.
    LEAVE PROGRAM.
    WHEN 'NORMAL'.
    CALL METHOD PICTURE->SET_DISPLAY_MODE
    EXPORTING
    DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL.
    WHEN 'FIT'.
    CALL METHOD PICTURE->SET_DISPLAY_MODE
    EXPORTING
    DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT.
    WHEN 'NORMAL_C'.
    CALL METHOD PICTURE->SET_DISPLAY_MODE
    EXPORTING
    DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL_CENTER.
    WHEN 'FIT_C'.
    CALL METHOD PICTURE->SET_DISPLAY_MODE
    EXPORTING
    DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT_CENTER.
    WHEN 'STRETCH'.
    CALL METHOD PICTURE->SET_DISPLAY_MODE
    EXPORTING
    DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_STRETCH.
    WHEN 'CLEAR'.
    CALL METHOD PICTURE->CLEAR_PICTURE.
    WHEN SPACE.
    CALL METHOD PICTURE->LOAD_PICTURE_FROM_URL
    EXPORTING
    URL = P_URL.
    IMPORTING
    RESULT = RETURN.
    CALL METHOD CL_GUI_CFW=>FLUSH.
    endcase.
    endmodule.
    Also check demo program:RSDEMO_PICTURE_CONTROL
    <b>TO GET DIFFERENT PICTURES</b>:
    (The following is <b>Judith Jessie Selvi's</b> reply for a similar query.Unfortunately I'm not able to track the URL of that thread).
    Refer this link
    1... create a logo using paint shop and save it as tifffile then using RSTXLDMC (is a program name) used to upload logo
    2.....create a logo using paint shop and save it as bmpfile then using SE78 you can do this.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIIMAGE/BCCIIMAGE.pdf
    http://www.sap-img.com/human/linking-employee-photos-using-sap-archive-link.htm
    Transaction OAOR,
    - OAOR (Business Document Navigator)
    Give Class Name - PICTURES Class Type - OT..... then Execute
    It will show you the list, then select ENJOYSAP_LOGO.
    On that list, you will find one control with a "create" tab.
    Click std. doc types.
    Select SCREEN and double-click.
    It will push FILE selection screen.
    Select your company logo (.gif) and press OK.
    It will ask for a description- for instance: "company logo".
    It will let you know your doc has been stored successfully.
    You can find your logo under ENJOYSAP_LOGO->Screen->company logo.
    Just run your ALV program, you should find your company logo in place of the EnjoySAP logo.
    Regards,
    Beejal
    **Reward if this helps

Maybe you are looking for

  • How can i set up external email account to show up in iCloud?

    I can access my Earthlink and Gmail accounts through my iPhone, but not yet through my new Mac. Didn't see a way in settings to do that in iCloud.  Any pointers?

  • How can i include the file, not xsl file, to xsl ?

    Hi, I would like to include a file called 'head.inc' to xsl. How can i do that ? the content of the head.inc is simple, just a part of the html code. say: <html> <head></head> <body> i can't use <xsl:import /> or <xsl:include />, which tag i can ?? T

  • How to use Unicode characters with TestStand?

    I'm trying to implement the use of Greek characters such as mu and omega for units. I enabled multi-byte support in the station options and attempted to paste some characters in. I was able to paste the mu character (μ) and import it from Excel with

  • Background image not displaying properly

    My site is not displaying correctly on mobiles and ipads.  I want my background image to span the width of most widescreen monitors but it's not displaying correctly.  I am sure I am doing something wrong.  Also have some problems with the map not sp

  • Downlaod files from site hosted on weblogic server

    Dear Freinds Hi, I Have a requirment of providing the downlaod files(tex, xml ) from my web site hostd on weblogic 6.1 server.And all the downlaod should be password protected . Can you people suggest some ways .How to achieve this. Thanks in advance