2010 Mar 15 5:22 AM
Hiii Everyone,
i'm brand-new beginner to programming in ABAP, and i'm facing a problem with my program and i wish for u to help me.
If there is more than 1 record under the same customer number, the user will be able to navigate through records using the previous and next buttons or to do that from the title bar buttons. The thing is, I don't know the code of how to make it go backward and forward through the records.
please need ur help in this and thank u in advance.
)
Hiii Everyone,
i'm brand-new beginner to programming in ABAP, and i'm facing a problem with my program and i wish for u to help me.
If there is more than 1 record under the same customer number, the user will be able to navigate through records using the previous and next buttons or to do that from the title bar buttons. The thing is, I don't know the code of how to make it go backward and forward through the records.
please need ur help in this and thank u in advance.
)
2010 Mar 15 5:37 AM
2010 Mar 15 5:39 AM
Check the Following Sample code
For Next
Program - LKKBLF01
Form - form scroll_end tables rt_columns type kkblo_t_columns.
For Previous (same Program)
form scroll_left tables rt_columns type kkblo_t_columns.
2010 Mar 15 6:17 AM
Hi Sir,
bcoz of it's under MODULE USER_COMMAND_7100 INPUT, so an error message appears to me said, " INCORRECT NESTING: BEFORE THE STATMENT "FORM" THE STRUCTURE INTRODUCED BY "CASE" MUST BE CONCLUDED BY "ENDCASE" which is already there!!!
Edited by: white angel on Mar 15, 2010 7:17 AM
2010 Mar 15 6:22 AM
check for the syntax error.........beacuse of which end case is not working......
Edited by: Sachin86 on Mar 15, 2010 7:22 AM
2010 Mar 15 6:26 AM
2010 Mar 15 6:42 AM
thats the code..... how can i attach a file so u can see a screen shot??
&----
*& Module USER_COMMAND_7100 INPUT
&----
text
----
MODULE USER_COMMAND_7100 INPUT.
CASE ok_code.
WHEN 'BACK'.
SET SCREEN 0.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'OK'.
SELECT * FROM ycustomer_t INTO G_TAB_CON_WA
WHERE customer_no = F2.
ENDSELECT.
IF sy-subrc EQ 0 .
MOVE-CORRESPONDING G_TAB_CON_WA to ycustomer_t.
ELSE.
MESSAGE 'customer number you entered is not found' type 'I'.
CLEAR G_TAB_CON_WA-clint.
CLEAR G_TAB_CON_WA-customer_no.
CLEAR G_TAB_CON_WA-begin_date.
CLEAR G_TAB_CON_WA-credit_used.
CLEAR G_TAB_CON_WA-credit_allowed.
ENDIF.
WHEN 'SAVE'.
MODIFY ycustomer_t FROM G_TAB_CON_WA.
MESSAGE ' Data has been updated' TYPE 'I'.
WHEN 'NEXT'.
form scroll_end tables rt_columns type kkblo_t_columns.
WHEN 'PREVIOUS'.
form scroll_left tables rt_columns type kkblo_t_columns.
ENDCASE.
ENDMODULE. " USER_COMMAND_7100 INPUT
2010 Mar 15 6:50 AM
form scroll_end tables rt_columns type kkblo_t_columns.
form scroll_left tables rt_columns type kkblo_t_columns.
Remove the above Form statements.Errors will be solved.
given Example for your reference you cant use directly so check the logic inside the form and make it for your requirement
2010 Mar 15 7:00 AM
this FORM should be defined somewhere right???
like when use FORM and PERFORM.
bcoz the error still there
2010 Mar 15 7:03 AM
WHEN 'NEXT'.
form scroll_end tables rt_columns type kkblo_t_columns.
Endform.
WHEN 'PREVIOUS'.
form scroll_left tables rt_columns type kkblo_t_columns.
endform.I want to Know where you are calling those forms like perform scroll_end . and Perform scroll_left ?
Kanagaraja L
Edited by: Kanagaraja Lokanathan on Mar 15, 2010 8:03 AM
2010 Mar 15 7:08 AM
WHEN 'NEXT'.
PERFORM scroll_end.
WHEN 'PREVIOUS'.
PERFORM scroll_left.
ENDCASE.
ENDMODULE. " USER_COMMAND_7100 INPUT
&----
*& Form scroll_end
&----
text
----
-->RT_COLUMNS text
----
form scroll_end tables rt_columns type kkblo_t_columns.
ENDFORM.
&---------------------------------------------------------------------
*& Form scroll_left
&----
text
----
-->RT_COLUMNS text
----
form scroll_left tables rt_columns type kkblo_t_columns.
ENDFORM.
i've tried this....the previous error gone..but now i have another error said " the type kkblo_t_columns. is unknown ".
really exhausting 😛
)
2010 Mar 15 7:21 AM
You have to Declare TYPE_POOLS KKBLO.
and see the logic inside the Form (Standard form in include LKKBLF01)
2010 Mar 15 7:55 AM
2010 Mar 15 8:58 AM
TYPE_POOLS are basically a grouping of types .i.e. when you have a type you want to use you can use a type without having to define it all over again!
2010 Mar 15 9:08 AM
Yes thats my question... what is the kkblo_t_columns... is it table or what... how to declare it???
2010 Mar 15 9:21 AM
Yes Internal table You have to declare like below
TYPE-POOLS kkblo.Inside your Program after that double click on KKBLO then you will navigate to Type-group and you can see the table definitions.
Kanagaraja L
2010 Mar 15 9:33 AM
this is really getting me frustrated....really sorry gentelmen but now i got new weird error...
different number of parameter in FORM and PERFORM ( routine: SCROLL_END, number of formal parameters: 1, number of actual parameters: 0 ).
2010 Mar 15 9:43 AM
Hi,
You seem to be getting a helluva compilation errors and you possibly cant list them out here for a chance that it might frustrate people who reply and also you
My suggestion:(considering the fact that you are new to ABAP) You can do a F1 on keywords which opens up a documentation for the keyword. You can also search the SDN for solution.
The error that you are getting is pretty straight forward. The number of formal parameters dont match with the actual parameters.
It essentially means that there is a difference in the number of parameters that you have used while calling the subroutine (PERFORM) and the definition of the subroutine (FORM...ENDFORM)
Use this
WHEN 'NEXT'.
PERFORM scroll_end tables itab.
2010 Mar 15 10:12 AM
I think the whole idea of having these errors is that the PERFORM thing is placed in "Module USER_COMMAND_7000 INPUT"... i don't know u r the expret coz everytime i got new error and still not working.
2010 Mar 16 6:18 AM
Hello Gentelmen,
can i use the system function " sy_step1" sscrfields-functext_02 from table "sscrfields" and use the icons as function code???
the previous FORM and PERFORM thing didn't work so i'm changing the hole idea of it
please need ur help.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |