Re: Module Pool Type Conversion Error.

Hi,
I have used the screen fields
quantity parameter of type imseg-erfmg
pmeins   parameter of type imseg-erfme.
while conversion.. i am passing the value
lbbes-erfmg to quantity
and lbbes-erfme to pmeins
when the conversion is done the lbbes-erfmg has negative value and when fed into the screen
it creates dump.
can anyone help me.
Thanks & Regards
Guhapriyan Subrahmanyam

hi,
We have the specify the reference field for the field in table control. Otherwise, we get a short dump showing an error conv_to_number.
To avoid this, we need to set the reference field in the properties of the field in table control.
Double click on the field of table control, we get the properties window opened, in it specify the reference field there.
There is an other simple way to avoid this dump. Select the field of the table contorl and in the TEXT inputbox which exists on the top right of the window, set last letter as _______V But in this case, we get the values justified to the right.
Regards,
Sailaja.

Similar Messages

  • WebDynpro call Returns an exception: Type conversion error

    Hi,
    I'm trying to start some of the standard SAP web dynpro .
    most of then work fine.
    some don't and i get the following error message.
    Root Cause
    The initial exception that caused the request to fail, was:
    +com.sap.aii.proxy.framework.core.DataAccessException: Type conversion error, field TAX_PER_DIEMTAX, complex type class com.sap.xss.tra.tre.model.expenses.Ptrv_Web_General_Data_Int+
    +at com.sap.aii.proxy.framework.core.JcoBaseTypeData.propagateJcoException(JcoBaseTypeData.java:130)+
    +at com.sap.aii.proxy.framework.core.JcoBaseTypeData.setElementValue(JcoBaseTypeData.java:751)+
    +at com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCModelClass.setAttributeValue(DynamicRFCModelClass.java:482)+
    +at com.sap.tc.webdynpro.progmodel.context.GenericModelClassCopyHelper.setAttributeValue(GenericModelClassCopyHelper.java:69)+
    +at com.sap.tc.webdynpro.progmodel.context.CopyService.copyCorresponding(CopyService.java:55)+
    +... 66 more+
    See full exception chain for details.
    could anyone give me an hint.
    jco connetion are made and testet for:
    sap_r3_humanresources
    sap_r3_finacials
    sap_r3_selfservicegenerics
    sap_r3_travel
    analog the *_MetaData
    Thank in advance
    Maximilian

    Hello
    did you solve this problem? I have the same error
    Regards

  • DataAccessException Type conversion error complex type class

    Hello,
    We meet some trouble randomly wrbtr field, we have suspected the jco cache, but after a reboot the problem still occurs.
    We currently use this field on others webdynpro applications.
    While execute the message displays :
    DataAccessException : Type conversion error, field wrbtr complex type class dop.model.Zst_Pp_liste
    We have a Z customize structure, which contains a zone "WAERS", used as reference field for wrbtr
    Anyone has an idea to look for ?

    Are you sure you have posted this question in the correct forum?  I don't see how this is Web Dynpro ABAP related. You refer to JCo cache and Java style class names.  I think perhaps you actually should have posted this question in the Web Dynpro Java forum?

  • Type conversion error, field ABSENCE_TYPE while accessing General Informati

    Hi ,
    One of the user is facing issue while he is accessing General Information link under Manager Self Service -> Team on portal. He is getting the below error message while accessing it.
    500   Internal Server Error
      SAP NetWeaver Application Server 7.00/Java AS 7.00 
    Failed to process request. Please contact your system administrator.
    [Hide]
    Error Summary
    While processing the current request, an exception occured which could not be handled by the application or the framework.
    If the information contained on this page doesn't help you to find and correct the cause of the problem, please contact your system administrator. To facilitate analysis of the problem, keep a copy of this error page. Hint: Most browsers allow to select all content, copy it and then paste it into an empty document (e.g. email or simple text file).
    Root Cause
    The initial exception that caused the request to fail, was:
       com.sap.aii.proxy.framework.core.DataAccessException: Type conversion error, field ABSENCE_TYPE, complex type class com.sap.xss.hr.eeprofile.absencedays.model.Hrmss_Rfc_Ep_Read_Absencedays_Input
        at com.sap.aii.proxy.framework.core.JcoBaseTypeData.propagateJcoException(JcoBaseTypeData.java:130)
        at com.sap.aii.proxy.framework.core.JcoBaseTypeData.setElementValue(JcoBaseTypeData.java:751)
        at com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCModelClass.setAttributeValueAsString(DynamicRFCModelClass.java:669)
        at com.sap.xss.hr.eeprofile.absencedays.model.Hrmss_Rfc_Ep_Read_Absencedays_Input.setAbsence_Type(Hrmss_Rfc_Ep_Read_Absencedays_Input.java:192)
        at com.sap.xss.hr.eeprofile.absencedays.wdp.IPublicBAbsenceDaysComp$IHrmss_Rfc_Ep_Read_Absencedays_InputElement.setAbsence_Type(IPublicBAbsenceDaysComp.java:579)
        ... 64 more
    See full exception chain for details.
    System Environment
    Client
    Web Dynpro Client Type HTML Client
    User agent Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; WOW64; SV1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; MS-RTC LM 8)
    Version null
    DOM version null
    Client Type msie6
    Client Type Profile ie6
    ActiveX enabled
    Cookies enabled
    Frames enabled
    Java Applets enabled
    JavaScript enabled
    Tables enabled
    VB Script enabled
    Server
    Web Dynpro Runtime Vendor: SAP, build ID: 7.0017.20100223114935.0000 (release=NW04S_17_REL, buildtime=2010-02-23:11:33:08[UTC], changelist=80269, host=pwdfm114), build date: Wed Apr 28 21:07:28 BST 2010
    J2EE Engine 7.00 patchlevel 112614.44
    Java VM IBM J9 VM, version:2.3, vendor: IBM Corporation
    Operating system Linux, version: 2.6.16.60-0.21-smp, architecture: amd64
    Session & Other
    Session Locale en_GB
    Time of Failure Wed Oct 06 12:13:18 BST 2010 (Java Time: 1286363598619)
    Web Dynpro Code Generation Infos
    sap.com/pb
    SapDictionaryGenerationCore 7.0017.20061002105236.0000 (release=645_VAL_REL, buildtime=2008-09-17:13:01:31[UTC], changelist=419377, host=PWDFM101.wdf.sap.corp)
    SapDictionaryGenerationTemplates 7.0017.20061002105236.0000 (release=645_VAL_REL, buildtime=2008-09-17:13:01:37[UTC], changelist=419377, host=PWDFM101.wdf.sap.corp)
    SapGenerationFrameworkCore 7.0017.20060719095755.0000 (release=645_VAL_REL, buildtime=2008-09-17:12:48:53[UTC], changelist=411255, host=PWDFM101.wdf.sap.corp)
    SapIdeWebDynproCheckLayer 7.0017.20080801093115.0000 (release=645_VAL_REL, buildtime=2008-09-17:13:07:06[UTC], changelist=495367, host=PWDFM101.wdf.sap.corp)
    SapMetamodelCommon 7.0017.20061002105432.0000 (release=645_VAL_REL, buildtime=2008-09-17:12:49:40[UTC], changelist=419384, host=PWDFM101.wdf.sap.corp)
    SapMetamodelCore 7.0017.20061002105432.0000 (release=645_VAL_REL, buildtime=2008-09-17:12:49:34[UTC], changelist=419384, host=PWDFM101.wdf.sap.corp)
    SapMetamodelDictionary 7.0017.20060719095619.0000 (release=645_VAL_REL, buildtime=2008-09-17:12:58:48[UTC], changelist=411251, host=PWDFM101.wdf.sap.corp)
    SapMetamodelWebDynpro 7.0017.20080801093120.0000 (release=645_VAL_REL, buildtime=2008-09-17:13:03:59[UTC], changelist=495368, host=PWDFM101.wdf.sap.corp)
    SapWebDynproGenerationCTemplates 7.0017.20080829103545.0000 (release=645_VAL_REL, buildtime=2008-09-17:13:16:41[UTC], changelist=499141, host=pwdfm101)
    SapWebDynproGenerationCore 7.0017.20080801093115.0000 (release=645_VAL_REL, buildtime=2008-09-17:13:07:12[UTC], changelist=495367, host=PWDFM101.wdf.sap.corp)
    SapWebDynproGenerationTemplates 7.0017.20080829103545.0000 (release=645_VAL_REL, buildtime=2008-09-17:13:16:41[UTC], changelist=499141, host=pwdfm101)
    sap.com/tcwddispwda
    No information available null
    sap.com/pb_api
    SapDictionaryGenerationCore 7.0017.20061002105236.0000 (release=645_VAL_REL, buildtime=2008-09-17:13:01:31[UTC], changelist=419377, host=PWDFM101.wdf.sap.corp)
    SapDictionaryGenerationTemplates 7.0017.20061002105236.0000 (release=645_VAL_REL, buildtime=2008-09-17:13:01:37[UTC], changelist=419377, host=PWDFM101.wdf.sap.corp)
    SapGenerationFrameworkCore 7.0017.20060719095755.0000 (release=645_VAL_REL, buildtime=2008-09-17:12:48:53[UTC], changelist=411255, host=PWDFM101.wdf.sap.corp)
    SapIdeWebDynproCheckLayer 7.0017.20080801093115.0000 (release=645_VAL_REL, buildtime=2008-09-17:13:07:06[UTC], changelist=495367, host=PWDFM101.wdf.sap.corp)
    SapMetamodelCommon 7.0017.20061002105432.0000 (release=645_VAL_REL, buildtime=2008-09-17:12:49:40[UTC], changelist=419384, host=PWDFM101.wdf.sap.corp)
    SapMetamodelCore 7.0017.20061002105432.0000 (release=645_VAL_REL, buildtime=2008-09-17:12:49:34[UTC], changelist=419384, host=PWDFM101.wdf.sap.corp)
    SapMetamodelDictionary 7.0017.20060719095619.0000 (release=645_VAL_REL, buildtime=2008-09-17:12:58:48[UTC], changelist=411251, host=PWDFM101.wdf.sap.corp)
    SapMetamodelWebDynpro 7.0017.20080801093120.0000 (release=645_VAL_REL, buildtime=2008-09-17:13:03:59[UTC], changelist=495368, host=PWDFM101.wdf.sap.corp)
    SapWebDynproGenerationCTemplates 7.0017.20080829103545.0000 (release=645_VAL_REL, buildtime=2008-09-17:13:16:41[UTC], changelist=499141, host=pwdfm101)
    SapWebDynproGenerationCore 7.0017.20080801093115.0000 (release=645_VAL_REL, buildtime=2008-09-17:13:07:12[UTC], changelist=495367, host=PWDFM101.wdf.sap.corp)
    SapWebDynproGenerationTemplates 7.0017.20080829103545.0000 (release=645_VAL_REL, buildtime=2008-09-17:13:16:41[UTC], changelist=499141, host=pwdfm101)
    sap.com/tcwdcorecomp
    No information available null
    Detailed Error Information
    Detailed Exception Chain
    com.sap.aii.proxy.framework.core.DataAccessException: Type conversion error, field ABSENCE_TYPE, complex type class com.sap.xss.hr.eeprofile.absencedays.model.Hrmss_Rfc_Ep_Read_Absencedays_Input
         at com.sap.aii.proxy.framework.core.JcoBaseTypeData.propagateJcoException(JcoBaseTypeData.java:130)
         at com.sap.aii.proxy.framework.core.JcoBaseTypeData.setElementValue(JcoBaseTypeData.java:751)
         at com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCModelClass.setAttributeValueAsString(DynamicRFCModelClass.java:669)
         at com.sap.xss.hr.eeprofile.absencedays.model.Hrmss_Rfc_Ep_Read_Absencedays_Input.setAbsence_Type(Hrmss_Rfc_Ep_Read_Absencedays_Input.java:192)
         at com.sap.xss.hr.eeprofile.absencedays.wdp.IPublicBAbsenceDaysComp$IHrmss_Rfc_Ep_Read_Absencedays_InputElement.setAbsence_Type(IPublicBAbsenceDaysComp.java:579)
         at com.sap.xss.hr.eeprofile.absencedays.BAbsenceDaysComp.callRFC(BAbsenceDaysComp.java:291)
         at com.sap.xss.hr.eeprofile.absencedays.BAbsenceDaysComp.readAbsenceDaysData(BAbsenceDaysComp.java:236)
         at com.sap.xss.hr.eeprofile.absencedays.wdp.InternalBAbsenceDaysComp.readAbsenceDaysData(InternalBAbsenceDaysComp.java:230)
         at com.sap.xss.hr.eeprofile.absencedays.BAbsenceDaysCompInterface.readAbsenceDaysData(BAbsenceDaysCompInterface.java:134)
         at com.sap.xss.hr.eeprofile.absencedays.wdp.InternalBAbsenceDaysCompInterface.readAbsenceDaysData(InternalBAbsenceDaysCompInterface.java:191)
         at com.sap.xss.hr.eeprofile.absencedays.wdp.InternalBAbsenceDaysCompInterface$External.readAbsenceDaysData(InternalBAbsenceDaysCompInterface.java:243)
         at com.sap.xss.hr.eeprofile.absencedays.vac.VAbsenceDaysComp.onBeforeOutput(VAbsenceDaysComp.java:259)
         at com.sap.xss.hr.eeprofile.absencedays.vac.wdp.InternalVAbsenceDaysComp.onBeforeOutput(InternalVAbsenceDaysComp.java:260)
         at com.sap.xss.hr.eeprofile.absencedays.vac.VAbsenceDaysCompInterface.onBeforeOutput(VAbsenceDaysCompInterface.java:143)
         at com.sap.xss.hr.eeprofile.absencedays.vac.wdp.InternalVAbsenceDaysCompInterface.onBeforeOutput(InternalVAbsenceDaysCompInterface.java:136)
         at com.sap.xss.hr.eeprofile.absencedays.vac.wdp.InternalVAbsenceDaysCompInterface$External.onBeforeOutput(InternalVAbsenceDaysCompInterface.java:212)
         at com.sap.pcuigp.xssfpm.wd.FPMComponent.callOnBeforeOutput(FPMComponent.java:603)
         at com.sap.pcuigp.xssfpm.wd.FPMComponent.doProcessEvent(FPMComponent.java:569)
         at com.sap.pcuigp.xssfpm.wd.FPMComponent.doEventLoop(FPMComponent.java:438)
         at com.sap.pcuigp.xssfpm.wd.FPMComponent.wdDoInit(FPMComponent.java:196)
         at com.sap.pcuigp.xssfpm.wd.wdp.InternalFPMComponent.wdDoInit(InternalFPMComponent.java:110)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.doInit(DelegatingComponent.java:108)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.init(ClientComponent.java:430)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:362)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.initApplication(ApplicationSession.java:756)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:291)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingPortal(ClientSession.java:733)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:668)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
         at com.sap.tc.webdynpro.clientserver.session.core.ApplicationHandle.doProcessing(ApplicationHandle.java:73)
         at c
    Regards,
    Sreedhar

    Are you sure you have posted this question in the correct forum?  I don't see how this is Web Dynpro ABAP related. You refer to JCo cache and Java style class names.  I think perhaps you actually should have posted this question in the Web Dynpro Java forum?

  • Module Pool (tabstrip control Error :  )

    I am trying to activate tabstrip control in module pool but error is coming like no sub screen is assigned to tabstrip pushbutton
    tab12.
    my main screen is : 0221
    flow logic for 0221 is below :
    PROCESS BEFORE OUTPUT.
    CALL SUBSCREEN SUB1 INCLUDING SY-REPID '0321'.
    CALL SUBSCREEN SUB2 INCLUDING SY-REPID '0322'.
    PROCESS AFTER INPUT.
    CALL SUBSCREEN SUB1.
    CALL SUBSCREEN SUB2.
    MODULE USER_COMMAND_0221.
    and 0321 and 0322 is subscreen and i also gave ref field sub1 and sub2 .
    can you plz help me to solve the problem ?

    Hi,
    yes i created sub screen. i am going to explain what i have done .
    step : i created screen 200 (i choose subscreen)and inside 200 i put  tabstripcontrol then in tab1 i gave ref field sub1 and tab2 i gave ref field sub2 and fatch code ic1 and ic2.
    and then i created screen 221 and 222.
    inside 200 flow logic i wrote below code but still its giving me same error.
    PROCESS BEFORE OUTPUT.
    CALL SUBSCREEN SUB1 INCLUDING SY-REPID '0221'.
    CALL SUBSCREEN SUB2 INCLUDING SY-REPID '0222'.
    PROCESS AFTER INPUT.
    CALL SUBSCREEN SUB1.
    CALL SUBSCREEN SUB2.
    MODULE USER_COMMAND_0221.
    i dont know is it required to make any normal screen .
    please try to give me ans as soon as possible.

  • Unicode Type Conversion Error

    Hi Friend,
    I am working in UNICODE project,i need one help,
    I have one error .
    Actually, im using one structure(Z0028) and passing values to internal table.
    At that time i shows one error.
    Actually,this error is due to type conversion problem.
    In that structure,i ve one packed datatype ,so, if i select
    unicode check it shows error.
    I will sent example prg and error also.
    Please give some solution to slove.
    REPORT  YPRG1                                   .
    TABLES: Z0028.
    DATA:I_Z0028 TYPE Z0028 OCCURS 0 WITH HEADER LINE .
    SELECT * FROM Z0028 INTO TABLE I_Z0028 .
    IF SY-SUBRC <> 0 .
      WRITE:/ ' NO DATA'.
    ENDIF.
      LOOP AT I_Z0028.
        WRITE:/ I_Z0028.
      ENDLOOP.
    Regards,
    Kalidas.T

    Hi,
    Display fields
    do like this..
    REPORT YPRG1 .
    TABLES: Z0028.
    DATA:I_Z0028 TYPE Z0028 OCCURS 0 WITH HEADER LINE .
    SELECT * FROM Z0028 INTO TABLE I_Z0028 .
    IF SY-SUBRC 0 .
    WRITE:/ ' NO DATA'.
    ENDIF.
    LOOP AT I_Z0028.
    WRITE:/ I_Z0028-field1,
                  I_Z0028-field2
    I_Z0028-field3.
    ENDLOOP.
    Regards,
    Prashant

  • Module Pool Nested Screen Error

    Hi All,
         I have 6 screens in my APP. I have used Set Screen 0 then call screen XXX to set another screen. However after certain usage it gives me an error stating 'You requested two many consecutive nested call screen'.
    Can anybody help me on this.
    Thankx in Adv.

    Hi Sanjay,
    As You Set the Screen as 0. The below that just give levae screen So that from the screen from which u r leaving out is closed... so that u can have some restricted number of screens in used. At that time u will not be given any run time error. ok
    All the best.
    Murthy

  • Is there a user exit called when a module pool program is launch ?

    Hello,
    I know the exit 'EXIT_SAPLSABE_010' and it's very usefull for adding code before a report is launch.
    But this exit is not called when a program is a "Module pool" type.
    Is there a way to add my own code before this kind of program is launch ?
    Thanks in advance,
    Simon
    Edited by: Simon Desbonnets on Mar 9, 2010 2:23 PM

    Thanks for your answer.
    No it's not for initializing values. It's for logging statistics into a specific table (program name, date ...).
    The event "load-of-program" can be use for one program, it's not what I'm looking for.
    I would like to know if there is an exit that is called each time a module pool program is executed.

  • Conversion Error - when Stored Procedure Execution Statement line is broken

    Hi ,
    I am getting data type conversion Error whenever any value of a multivalued parameter is brought to the next line(or breaking up of the EXEC command to multiple lines, by enter key or tab.
    On executing SP_ABC with second value for @parm3UID in the next line-
    THE ERROR IS -
    Similarly when date value for @parm4Date is throwing when SP Execution statement is
    Kindly help me resolving the issue.
    Thanks in Advance!!
    Mridhula
    Mridhula.S

    Oh sorry Patrick , here is the code-
    when second value of @parm3UID is entered to the next line-
    exec dbo.SP_ABC @parm1UID=N'DF617C6D-F68F-E411-9CAE-180373C4FF6B',
    @parmProgram=N'Null', @parm3UID=N'AA8AC32B-2AC5-E311-80CB-005056B2487C,
    661E59C1-29C5-E311-80CB-005056B2487C',
    @parm4Date='2015-01-05 00:00:00'
     For the above code Error displayed is
    Conversion failed when converting from a character string to uniqueidentifier.
    when Date value @parm4Date is broken-
    exec dbo.SP_ABC @parm1UID=N'DF617C6D-F68F-E411-9CAE-180373C4FF6B',
    @parmProgram=N'Null', @parm3UID=N'AA8AC32B-2AC5-E311-80CB-005056B2487C,661E59C1-29C5-E311-80CB-005056B2487C',
    @parm4Date='2015-01-05
     00:00:00'
     For the above code Error displayed is
    Msg 8114, Level 16, State 1, Procedure SP_ABC, Line 0
    Error converting data type varchar to datetime
    When the codes come in a single line exec statement works fine.Only issue is when a carriage return or tab comes in between. Please let me know for further details.
    Thanks!!
    Mridhula.S

  • Getting error while calling a subscreen in  module pool program

    HI  ALL,
                         ACTUALLY I'M GETTING A SYNTAX ERROR WHILE I'M CALLING A SUBSCREEN
                       IN A MODULE POOL PROGRAM IN PAI MODULE
                       THE ERROR IS AS FOLLOW
                           "." or "ID ... FIELD ..." expected after "SUBSCREEN"
                        CAN ANYBODY PLS HELP ME.
    REGARDS
    ANDREWS

    HI MAX ,
                      THE CODE IS AS FOLLOWS:
    *& Report  ZTABSTRIP_PS
    REPORT  ZTABSTRIP_PS.
    type-pools : vrm.
    DATA:number1 type I,
         number2 type I,
         result  type I,
         ok_code like SY-UCOMM,
         employee1 type c,
         ABAP(19)    type c,
         SALES(19)  type c,
         HR(19)      type c,
         MM(19)     type  c,
    employee type c.
        emp type c.
    CONTROLS  tabstrip TYPE TABSTRIP.
    CALL SCREEN 100.
    call screen 110.
    call screen 130.
    call screen 120.
    call screen  140.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'STATUS'.
      SET TITLEBAR 'TITLE'.
      CASE OK_CODE.
        WHEN 'BACK' or 'EXIT' or 'DELETE'.
         leave program.
         WHEN 'SAVE'.
           MESSAGE 'please choose a valid function' TYPE 'I'.
       WHEN 'BACK'.
        leave PROGRAM.
    when  'EXIT' or 'DELETE'.
        leave to screen 0.
        WHEN 'SAVE'.
          MESSAGE 'please choose a valid function' TYPE 'I'.
    endcase.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
    CASE OK_CODE.
      when 'TAB1'.
    tabstrip-activetab = 'TAB1'.
       when 'TAB2'.
    tabstrip-activetab = 'TAB2'.
    result = number1 + number2.
       when 'TAB3'.
      tabstrip-activetab = 'TAB3'.
    SET TITLEBAR 'TITLE1'.
      when 'TAB4'.
        tabstrip-activetab = 'TAB4'.
       if employee = 'NEERAJ'.
         ABAP = 'NEERAJ'.
       elseif employee = 'UMESH'.
         SALES = 'UMESH'.
       ELSEIF employee = 'RAM'.
         HR = 'RAM'.
       elseif employee = 'ANIL'.
         MM = 'ANIL'.
         endif.
       employee = employee.
    WHEN 'BACK'.
        leave PROGRAM.
    when  'EXIT' or 'DELETE'.
        leave to screen 0.
        WHEN 'SAVE'.
          MESSAGE 'please choose a valid function' TYPE 'I'.
    ENDCASE.
       WHEN 'BACK' or 'EXIT' or 'DELETE'.
         leave program .
         WHEN 'SAVE'.
           MESSAGE 'please choose a valid function' TYPE 'I'.
    endcase.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  STATUS_0110  OUTPUT
          text
    **MODULE STATUS_0110 OUTPUT.
    SET PF-STATUS 'STATUS1'.
    SET TITLEBAR 'xxx'.
    **case ok_code.
    **WHEN 'back' or 'exit' or 'delete'.
        leave PROGRAM.
        WHEN 'save'.
          MESSAGE 'please choose a valid function ' TYPE 'W'.
    ENDCASE.
    **ENDMODULE.                 " STATUS_0110  OUTPUT
    *&      Module  USER_COMMAND_0110  INPUT
          text
    MODULE USER_COMMAND_0110 INPUT.
      number1 = number1.
      number2 = number2.
    CLEAR NUMBER1.
    CLEAR NUMBER2.
    REFRESH NUMBER1.
    REFRESH NUMBER2.
    ENDMODULE.                 " USER_COMMAND_0110  INPUT
    *&      Module  STATUS_0130  OUTPUT
          text
    MODULE STATUS_0130 OUTPUT.
    SET PF-STATUS 'STATUS2'.
    SET TITLEBAR 'xxx'.
    RESULT = number1 + number2.
    *CLEAR RESULT.
    REFRESH RESULT.
    ENDMODULE.                 " STATUS_0130  OUTPUT
    *&      Module  STATUS_0120  OUTPUT
          text
    MODULE STATUS_0120 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    DATA:  l_name TYPE vrm_id,
            li_list TYPE vrm_values,
            l_value LIKE LINE OF li_list.
      l_value-key = '1'.
      l_value-text = 'ANIL'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
      l_value-key = '2'.
      l_value-text = 'RAM'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
      l_value-key = '3'.
      l_value-text = 'NEERAJ'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
      l_value-key = '4'.
      l_value-text = 'UMESH'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
    l_name =  'employee'.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          ID                    =  l_name
          VALUES                =  li_list
       EXCEPTIONS
         ID_ILLEGAL_NAME       = 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.
    CLEAR li_list.
    ENDMODULE.                 " STATUS_0120  OUTPUT
    *&      Module  USER_COMMAND_0120  INPUT
          text
    MODULE USER_COMMAND_0120 INPUT.
    INCLUDING sy-repid '140'.
    employee1 = employee.
    IF employee1 CS 'NEERAJ'.
      call SUBSCREEN    sub4  .
      ABAP = 'NEERAJ'.
      CLEAR ABAP.
    ELSEIF employee1 CS 'UMESH'.
       call SUBSCREEN  sub4  .
        SALES = 'UMESH'.
        CLEAR SALES.
    elseif employee1 CS 'RAM'.
      call SUBSCREEN sub4 .
       HR = 'RAM'.
       CLEAR  HR.
    ELSEIF employee1 CS 'ANIL'.
       call SUBSCREEN sub4 .
       MM = 'ANIL'.
       CLEAR MM.
       endif.
    ENDMODULE.                 " USER_COMMAND_0120  INPUT
    *&      Module  STATUS_0140  OUTPUT
          text
    MODULE STATUS_0140 OUTPUT.
    *CASE OK_CODE.
       WHEN employee1  'NEERAJ'.
         screen-active = 1.
         ABAP = 'NEERAJ'.
       WHEN employee1 = 'UMESH'.
         screen-active = 1.
         SALES = 'UMESH'.
       WHEN employee1 = 'RAM'.
         screen-active = 1.
         HR = 'RAM'.
       WHEN employee1 = 'ANIL'.
         screen-active = 1.
         MM = 'ANIL'.
         endif.
    *ENDCASE.
    ENDMODULE.                 " STATUS_0140  OUTPUT

  • Error handling in module pool program

    hi,
    in module pool program after enabling a field if the user enters an invalid value iam giving a error message.
    message 'something' type 's' display like 'E'.
    then again it should go to the previous screen where the user enters the value for that enabled filed.
    can u guys share some ideas.

    Hi ,
    if it is a ascreen field use the below syntax
    Field <fieldname> module <module_validate>.
    in the module validate write the validation and throw error message ,the screen will be in error position
    if the field is in Table control
    Loop at <table control>.
       chain.
          field <fieldnamemodule <module_validate>.
                                                    "in the module validate write the validation and throw error message ,the screen will be in error position
      endchain.
    Endloop.
    Prabhudas

  • Error in module pool program

    Hi All,
    I have created 1 module pool program with screen no. 0100. But the statement CALL SCREEN 0100 is not getting executing its showing error i.e ' statement cannot be accessable' even i have created and activated the sceen 0100.
    Thanks...
    kiran

    Hi kiran,
    Open you program in se38 menu bar -> GOTO   -> ATTRIBUTES and check wheather it is  executable program or module pool program.
    if it is exeutable program then u can call the screen 0100 as ur intial screen. if not ur given type as module pool then u have to create a transaction in SE93 and give the screen name in that and prgoram name then it will display the screen which u hv created .
    if you want to show the screen 0100 as ur initial sceen in module pool program without using transaction it is not possible so use either executable program and use the stament call screen 0100.
    <b>reward if useful </b>
    Regards,
    sunil kairam.

  • Module pool program error

    hi expects,
       in this program in screen 100, i have provided select-options for material no,maximum qty,no. of kanban,no of unit per kanban in tabstrip and i am having 3 pushbuttons (create (screen110),change(screen 120),display(screen 130).but i am getting error in 100 & 110).in 110 , i should provide again select-options and table control.please help me to solve this problem.
    *& Module pool ZSAPMZPGM2 *
    PROGRAM ZSAPMZTECHANICALTESTPGM2 .
    TABLES : ZTECHANICALTEST2,MAKT.
    DATA : BEGIN OF ITAB OCCURS 0,
    ZMANDT LIKE ZTECHANICALTEST2-ZMANDT,
    ZMATNR LIKE ZTECHANICALTEST2-ZMATNR,
    ZMAXQTY LIKE ZTECHANICALTEST2-ZMAXQTY,
    ZNUMKB LIKE ZTECHANICALTEST2-ZNUMKB,
    ZBUNT LIKE ZTECHANICALTEST2-ZBUNT,
    ZCRTBY LIKE ZTECHANICALTEST2-ZCRTBY,
    ZCRTDT LIKE ZTECGHANICALTEST2-ZCRTDT,
    ZUPDBY LIKE ZTECHANICALTEST2-ZUPDBY,
    ZUPDDT LIKE ZTECHANICALTEST2-ZUPDDT,
    END OF ITAB.
    CONTROLS : VCONTROLS TYPE TABLEVIEW USING 120.
    CONTROLS : STRIP TYPE TABSTRIP.
    DATA : DYNNR LIKE SY-DYNNR VALUE 110
    *& Module USER_COMMAND_0100 INPUT
    text
    module USER_COMMAND_0100 input.
    CASE SY-UCOMM.
    WHEN 'DATA SELECTION'.
    DYNNR = 110.
    STRIP-ACTIVETAB = 'DATA SELECTION'.
    ENDCASE.
    endmodule. " USER_COMMAND_0100 INPUT
    *& Module USER_COMMAND_0110 INPUT
    text
    module USER_COMMAND_0110 input.
    CASE SY-UCOMM.
    WHEN 'CREATE SCREEN'.
    INSERT ZTECHANICALTEST2 FROM TABLE itab.
    SELECT * FROM ZTECHANICALTEST INTO ITAB.
    PROCESS BEFORE OUTPUT.
    *&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'V_CONTROL'
      MODULE V_CONTROL_INIT.
    *&SPWIZARD: MODULE V_CONTROL_CHANGE_TC_ATTR.
    *&SPWIZARD: MODULE V_CONTROL_CHANGE_COL_ATTR.
      LOOP AT   G_V_CONTROL_ITAB
           INTO G_V_CONTROL_WA
           WITH CONTROL V_CONTROL
           CURSOR V_CONTROL-CURRENT_LINE.
    *&SPWIZARD:   MODULE V_CONTROL_CHANGE_FIELD_ATTR
        MODULE V_CONTROL_MOVE.
        MODULE V_CONTROL_GET_LINES.
      ENDLOOP.
    MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    *&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'V_CONTROL'
      LOOP AT G_V_CONTROL_ITAB.
        CHAIN.
          FIELD ZTECHANICALTEST2-ZMANDT.
          FIELD ZTECHANICALTEST2-ZMATNR.
          FIELD ZTECHANICALTEST2-ZMAXQTY.
          FIELD ZTECHANICALTEST2-ZNUMKB.
          FIELD ZTECHANICALTEST2-ZKBUNT.
          FIELD ZTECHANICALTEST2-ZCRTBY.
          FIELD ZTECHANICALTEST2-ZCRTDT.
          FIELD ZTECHANICALTEST2-ZUPDBY.
          FIELD ZTECHANICALTEST2-ZUPDDT.
          MODULE V_CONTROL_MODIFY ON CHAIN-REQUEST.
        ENDCHAIN.
      ENDLOOP.
      MODULE V_CONTROL_USER_COMMAND.
    *&SPWIZARD: MODULE V_CONTROL_CHANGE_TC_ATTR.
    *&SPWIZARD: MODULE V_CONTROL_CHANGE_COL_ATTR.
    MODULE USER_COMMAND_0100.
    IF SY-SUBRC = 0.
    MESSAGE I000(0) WITH 'CREATED'.
    ELSE.
    MESSAGE E001(0) WITH 'NOT CREATED'.
    ENDIF.
    WHEN OTHERS.
    CLEAR OK_CODE.
    SET SCREEN 120.
    LEAVE SCREEN.
    ENDCASE.
    ENDCASE.
    endmodule. " USER_COMMAND_0110 INPUT
    *& Module USER_COMMAND_0120 INPUT
    text
    module USER_COMMAND_0120 input.
    CASE SY-UCOMM.
    WHEN 'DISPLAY SCREEN'.
    INSERT ZTECHANICALTEST2 FROM TABLE itab.
    SELECT * FROM ZTECHANICALTEST2 INTO ITAB.
    IF SY-SUBRC = 0.
    MESSAGE I000(0) WITH 'DISPLAY'.
    ELSE.
    MESSAGE E001(0) WITH 'NOT DISPLAY'.
    ENDIF.
    WHEN 'DISPLAY SCREEN'.
    CLEAR OK_CODE.
    SET SCREEN 130.
    LEAVE SCREEN.
    ENDCASE.
    ENDCASE.
    endmodule. " USER_COMMAND_0120 INPUT
    *& Module USER_COMMAND_0130 INPUT
    text
    module USER_COMMAND_0130 input.
    CASE SY-UCOMM.
    WHEN 'CHANGE SCREEN'.
    CASE SY-UCOMM.
    MODIFY ZTECHANICALTEST2 FROM TABLE itab.
    PROCESS BEFORE OUTPUT.
    *&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'V_CONTROL'
      MODULE V_CONTROL_INIT.
    *&SPWIZARD: MODULE V_CONTROL_CHANGE_TC_ATTR.
    *&SPWIZARD: MODULE V_CONTROL_CHANGE_COL_ATTR.
      LOOP AT   G_V_CONTROL_ITAB
           INTO G_V_CONTROL_WA
           WITH CONTROL V_CONTROL
           CURSOR V_CONTROL-CURRENT_LINE.
    *&SPWIZARD:   MODULE V_CONTROL_CHANGE_FIELD_ATTR
        MODULE V_CONTROL_MOVE.
        MODULE V_CONTROL_GET_LINES.
      ENDLOOP.
    MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    *&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'V_CONTROL'
      LOOP AT G_V_CONTROL_ITAB.
        CHAIN.
          FIELD ZTECHANICALTEST2-ZMANDT.
          FIELD ZTECHANICALTEST2-ZMATNR.
          FIELD ZTECHANICALTEST2-ZMAXQTY.
          FIELD ZTECHANICALTEST2-ZNUMKB.
          FIELD ZTECHANICALTEST2-ZKBUNT.
          FIELD ZTECHANICALTEST2-ZCRTBY.
          FIELD ZTECHANICALTEST2-ZCRTDT.
          FIELD ZTECHANICALTEST2-ZUPDBY.
          FIELD ZTECHANICALTEST2-ZUPDDT.
          MODULE V_CONTROL_MODIFY ON CHAIN-REQUEST.
        ENDCHAIN.
      ENDLOOP.
      MODULE V_CONTROL_USER_COMMAND.
    *&SPWIZARD: MODULE V_CONTROL_CHANGE_TC_ATTR.
    *&SPWIZARD: MODULE V_CONTROL_CHANGE_COL_ATTR.
    MODULE USER_COMMAND_0100.
    IF SY-SUBRC = 0.
    MESSAGE I000(0) WITH 'DISPLAY'.
    ELSE.
    MESSAGE E001(0) WITH 'NOT DIPLAY'.
    ENDIF.
    WHEN CHANGE SCREEN.
    LEAVE PROGRAM.
    ENDCASE.
    endmodule. " USER_COMMAND_0130 INPUT
    *& Module STATUS_0130 OUTPUT
    text
    module STATUS_0130 output.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    LOOP AT CONTROL VCONTROL.
    MODIFY ZTECHANICALTEST2 FROM TABLE ITAB.
    PROCESS BEFORE OUTPUT.
    *&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'V_CONTROL'
      MODULE V_CONTROL_INIT.
    *&SPWIZARD: MODULE V_CONTROL_CHANGE_TC_ATTR.
    *&SPWIZARD: MODULE V_CONTROL_CHANGE_COL_ATTR.
      LOOP AT   G_V_CONTROL_ITAB
           INTO G_V_CONTROL_WA
           WITH CONTROL V_CONTROL
           CURSOR V_CONTROL-CURRENT_LINE.
    *&SPWIZARD:   MODULE V_CONTROL_CHANGE_FIELD_ATTR
        MODULE V_CONTROL_MOVE.
        MODULE V_CONTROL_GET_LINES.
      ENDLOOP.
    MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    *&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'V_CONTROL'
      LOOP AT G_V_CONTROL_ITAB.
        CHAIN.
          FIELD ZTECHANICALTEST2-ZMANDT.
          FIELD ZTECHANICALTEST2-ZMATNR.
          FIELD ZTECHANICALTEST2-ZMAXQTY.
          FIELD ZTECHANICALTEST2-ZNUMKB.
          FIELD ZTECHANICALTEST2-ZKBUNT.
          FIELD ZTECHANICALTEST2-ZCRTBY.
          FIELD ZTECHANICALTEST2-ZCRTDT.
          FIELD ZTECHANICALTEST2-ZUPDBY.
          FIELD ZTECHANICALTEST2-ZUPDDT.
          MODULE V_CONTROL_MODIFY ON CHAIN-REQUEST.
        ENDCHAIN.
      ENDLOOP.
      MODULE V_CONTROL_USER_COMMAND.
    *&SPWIZARD: MODULE V_CONTROL_CHANGE_TC_ATTR.
    *&SPWIZARD: MODULE V_CONTROL_CHANGE_COL_ATTR.
    MODULE USER_COMMAND_0100.
    ENDLOOP.
    ENDLOOP.
    endmodule. " STATUS_0130 OUTPUT
    *& Module STATUS_0120 OUTPUT
    text
    module STATUS_0120 output.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    LOOP AT CONNTROL VCONTROL..
    PROCESS BEFORE OUTPUT.
    *&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'V_CONTROL'
      MODULE V_CONTROL_INIT.
    *&SPWIZARD: MODULE V_CONTROL_CHANGE_TC_ATTR.
    *&SPWIZARD: MODULE V_CONTROL_CHANGE_COL_ATTR.
      LOOP AT   G_V_CONTROL_ITAB
           INTO G_V_CONTROL_WA
           WITH CONTROL V_CONTROL
           CURSOR V_CONTROL-CURRENT_LINE.
    *&SPWIZARD:   MODULE V_CONTROL_CHANGE_FIELD_ATTR
        MODULE V_CONTROL_MOVE.
        MODULE V_CONTROL_GET_LINES.
      ENDLOOP.
    MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    *&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'V_CONTROL'
      LOOP AT G_V_CONTROL_ITAB.
        CHAIN.
          FIELD ZTECHANICALTEST2-ZMANDT.
          FIELD ZTECHANICALTEST2-ZMATNR.
          FIELD ZTECHANICALTEST2-ZMAXQTY.
          FIELD ZTECHANICALTEST2-ZNUMKB.
          FIELD ZTECHANICALTEST2-ZKBUNT.
          FIELD ZTECHANICALTEST2-ZCRTBY.
          FIELD ZTECHANICALTEST2-ZCRTDT.
          FIELD ZTECHANICALTEST2-ZUPDBY.
          FIELD ZTECHANICALTEST2-ZUPDDT.
          MODULE V_CONTROL_MODIFY ON CHAIN-REQUEST.
        ENDCHAIN.
      ENDLOOP.
      MODULE V_CONTROL_USER_COMMAND.
    *&SPWIZARD: MODULE V_CONTROL_CHANGE_TC_ATTR.
    *&SPWIZARD: MODULE V_CONTROL_CHANGE_COL_ATTR.
    MODULE USER_COMMAND_0100.
    endmodule. " STATUS_0120 OUTPUT
    *& Module STATUS_0110 OUTPUT
    text
    module STATUS_0110 output.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    WHEN 'DELETE ROWS'.
    CASE SY-UCOMM.
    DELETE FROM ZTECHANICALTEST2
    WHERE MATERIAL = 'NY'.
    WHEN 'UNDELETE ROWS'.
    LEAVE SCREEN.
    WHEN 'SELECT ALL'.
    CASE SY-UCOMM.
    SELECT * FROM ZTECHANICALTEST2 INTO ITAB.
    WRITE :/ ITAB.
    ENDSELECT.
    ENDCASE.
    WHEN 'DESELECT ALL'.
    endmodule. " STATUS_0110 OUTPUT

    what error message you are getting?

  • 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

  • How to throw error in Module pool

    Hi Experts,
    I have one probelum in Module pool Programm and i need you solution,
    i have 10 input fields in  module pool, and the first field is land1,
    when i will give input in land1 as "US" so it should throw error "not allowed"
    and all the field should be enable. should not be disable
    please help me out.
    thanks
    Vikash

    Hi Vikas,
    try this,
    if  LAND1 EQ 'US'.
    MESSAGE 'No Data can be found!' TYPE 'S' DISPLAY LIKE 'E'.
    LEAVE LIST-PROCESSING. 
    endif.
    Regards,
    Venkat.

Maybe you are looking for

  • BPC 7.5NW - Transports

    Hello Gurus, We just did some enhancements in our Appset in the DEV environment and should now promote these enhancements to the QA and PROD systems.  We want to use transports to accomplish this.  I am aware of the following: 1.  We will have to mov

  • Eraser tool won't reverse when swapping fore and background colors

    When using the eraser tool to blend layers I often want to "unerase" a bit so hit "X" to paint with white and it still erases to layer below just as it had before switching the foreground "W" and background "B" colors. Makes no sense to me as I thoug

  • How to find changes in Table sources?

    How does the crawler know what changed in a table source without the column LASTMODIFIEDDATE like Database sources?

  • Forgotten administrator password for imac how do I reset?

    I have forgotten the password for teh administartor account on my imac.  There are no other admin accounts set up. How do I rest the password?

  • Best way for Pumpin Sidechain?

    Using Logic 8 and wanted to know the best way to do a pumping sidechain effect in Logic? I have seen a few different ways and tried a few and still having difficulty - also it pumped the string/pad part but not that much? Is there a step through way