‎2009 Feb 09 9:41 AM
hi all,
im new to abap..
i'm practicing module pool programing..i'm trying a table control example from SAP technical.com
in that example..i'm getting an error like statement not accessible..
this error is occuring at the statement : call screen 130.
i'm unable to find the error..
can any body help me regarding this issue...
the program is like this..
TABLES : MARA.
TYPES: BEGIN OF ST_MARA,
MATNR TYPE MARA-MATNR,
ERSDA TYPE MARA-ERSDA,
ERNAM TYPE MARA-ERNAM,
LAEDA TYPE MARA-LAEDA,
END OF ST_MARA.
DATA: IT_ST TYPE TABLE OF ST_MARA,
WA_ST TYPE ST_MARA,
IT_MARA TYPE MARA,
WA_MARA TYPE MARA,
OK_CODE LIKE SY-UCOMM.
CALL SCREEN 130.
&----
*& Module V1 INPUT
&----
text
----
MODULE V1 INPUT.
WHEN 'SAVE'.
WA_ST-MATNR = MARA-MATNR.
WA_ST-ERSDA = MARA-ERSDA.
WA_ST-ERNAM = MARA-ERNAM.
WA_ST-LAEDA = MARA-LAEDA.
MOVE-CORRESPONDING WA_ST TO WA_MARA.
INSERT INTO MARA VALUES WA_MARA.
WHEN 'DELETE'.
WA_ST-MATNR = MARA-MATNR.
WA_ST-ERSDA = MARA-ERSDA.
WA_ST-ERNAM = MARA-ERNAM.
WA_ST-LAEDA = MARA-LAEDA.
MOVE-CORRESPONDING WA_ST TO WA_MARA.
DELETE MARA FROM WA_MARA.
WHEN 'MODIFY'.
WA_ST-MATNR = MARA-MATNR.
WA_ST-ERSDA = MARA-ERSDA.
WA_ST-ERNAM = MARA-ERNAM.
WA_ST-LAEDA = MARA-LAEDA.MOVE-CORRESPONDING WA_ST TO WA_MARA.
MODIFY MARA FROM WA_MARA.
ENDCASE.
ENDMODULE. " V1 INPUT
&----
*& Module EXIT INPUT
&----
text
----
MODULE EXIT INPUT.
IF OK_CODE = 'EXIT'.
LEAVE PROGRAM.
ENDIF.
ENDMODULE. " EXIT INPUT
‎2009 Feb 09 9:44 AM
Hi,
i.e syntax problem.
call screen '0130'. < try this way.
Regards,
Naveen.
‎2009 Feb 09 9:47 AM
hi naveen,
thank you for your quick reply..
i tried this but of no use..
‎2009 Feb 09 9:52 AM
after using the syntax that Naveen has stated , Please check wheather the screen(130) is active ot not .
If not , then activate the same .
‎2009 Feb 09 9:56 AM
‎2009 Feb 09 9:59 AM
Hi,
CALL SCREEN 130 should be under PBO , as it is not under any of teh events like PBO/PAI, it is not accessible.
Keep it under PBO and try .
revrt back..
Regards,
Naveen
‎2009 Feb 09 9:46 AM
‎2009 Feb 09 9:48 AM
‎2009 Feb 09 9:51 AM
Hi,
CALL SCREEN 130 should be under PBO , as it is not under any of teh events like PBO/PAI, it is not accessible.
Keep it under PBO and try .
Regards,
Naveen
‎2009 Feb 09 9:56 AM
Can u send the Exact code that you are using ?
If the one provided above is the actual code, then the statemen .. CASE is missing in the code.
There is ENDCASE but no CASE.
‎2009 Feb 09 10:04 AM
why this call screen 0130 statement is for?
is there any problem if that statement is not there?
‎2009 Feb 09 10:06 AM
call s reen statement call the normal screen designed in the screen painter.in your case it will call the screen designed as normal screen with screen number 130, with 3 command button on it .
Pooja
‎2009 Feb 09 10:07 AM
Hi,
You have created a Screen called 0130? If yes the do you want to see the screen with all the fields on it then you have to tell the system to by using this call statement.
Did you you get any error while activating? Check it. Coy i copied the code you have pasted here and it didn't give me the error you where talking about.
Thanks,
Prashanth
‎2009 Feb 09 10:09 AM
Hi, Harini
Have you Created the Screen 0130 using SE51 ? i think you didn't do that.
Please Reply iif you didn't.
Kind Regards,
Faisal
‎2009 Feb 09 10:31 AM
i created the screen...but i think there is some problem regarding modules..
i have n't uncommented any of the modules..but created modules exit and v1.
‎2012 Mar 09 7:05 PM
Hi Satish,
I have gone through the same example that you mentioned in saptechnical.com but i found no problem with the way they did.
Have you created both report program and screen with the same name and screen number 130 and activated?
what do you mean by not uncommented any of the modules? type your flowlogic here.
I suggest you go through help.sap.com and understand how the flow works in Flow logic of module pool instead of just seeing an example. Because it will help you in creating your own screens however you want if you understand the flow of program in module pool.
try this link.
http://help.sap.com/SAPhelp_nw04/helpdata/en/9f/dbac5e35c111d1829f0000e829fbfe/content.htm
Best regards.
Aswath.
Edited by: aswathsa on Mar 10, 2012 12:35 AM
‎2012 Mar 09 7:15 PM
Before anyone else answers, please see the date of the OP.
Rob
‎2009 Feb 09 9:50 AM
Hi,
Try this CALL SCREEN 0130.
Hope this might help you.
Thanks,
Prashanth
‎2009 Feb 09 9:51 AM
‎2009 Feb 09 10:03 AM
Hi,
I guess you need to create the screen with number 130 assigned to it in se80 or by double click on screen ,it will prompt you to create the new screen simply click yes it will automatically take you to acsreen painter ,and in that screen you need to create 3 command button with fn code as SAVE,DELETE and MODIFY.
Read about module pool/doalogue programming or search forum how to design the screen in screen painter etc. for better understanding.
Need not to bother much,simply serach the net and the forum,go throug ABAP in 21 days for quick help.
All the very best.
Hope it help you.
Pooja
‎2009 Feb 09 10:18 AM
Two possible solutions are:
1) Change your program type to Executable from Module Pool
2) Make a Tcode for ur module pool and call screen 130 thro Tcode. Remove Call screen 130. line from ur program
‎2012 Mar 09 4:55 PM
Dear Friend,
Please remove CALL SCREEN 130 in your program try this below code.
TABLES : MARA.
TYPES: BEGIN OF ST_MARA,
MATNR TYPE MARA-MATNR,
ERSDA TYPE MARA-ERSDA,
ERNAM TYPE MARA-ERNAM,
LAEDA TYPE MARA-LAEDA,
END OF ST_MARA.
DATA: IT_ST TYPE TABLE OF ST_MARA,
WA_ST TYPE ST_MARA,
IT_MARA TYPE MARA,
WA_MARA TYPE MARA,
OK_CODE LIKE SY-UCOMM.
CALL SCREEN 130. Remove this
&----
*& Module V1 INPUT
&----
text
-
MODULE V1 INPUT.
WHEN 'SAVE'.
WA_ST-MATNR = MARA-MATNR.
WA_ST-ERSDA = MARA-ERSDA.
WA_ST-ERNAM = MARA-ERNAM.
WA_ST-LAEDA = MARA-LAEDA.
MOVE-CORRESPONDING WA_ST TO WA_MARA.
INSERT INTO MARA VALUES WA_MARA.
WHEN 'DELETE'.
WA_ST-MATNR = MARA-MATNR.
WA_ST-ERSDA = MARA-ERSDA.
WA_ST-ERNAM = MARA-ERNAM.
WA_ST-LAEDA = MARA-LAEDA.
MOVE-CORRESPONDING WA_ST TO WA_MARA.
DELETE MARA FROM WA_MARA.
WHEN 'MODIFY'.
WA_ST-MATNR = MARA-MATNR.
WA_ST-ERSDA = MARA-ERSDA.
WA_ST-ERNAM = MARA-ERNAM.
WA_ST-LAEDA = MARA-LAEDA.MOVE-CORRESPONDING WA_ST TO WA_MARA.
MODIFY MARA FROM WA_MARA.
ENDCASE.
ENDMODULE. " V1 INPUT
&----
*& Module EXIT INPUT
&----
text
-
MODULE EXIT INPUT.
IF OK_CODE = 'EXIT'.
LEAVE PROGRAM.
ENDIF.
ENDMODULE. " EXIT INPUT