on 11-18-2009 10:40 AM
Hello everyone. i have trouble about printing barcode using SAPscipt.
now i have program sapscript report program is "ZRABARC01" this program copy from standard RABARC01.
and this program call sap script = "ZAA_BARCODE" (you will see at below of this message)
this program work well.
i want to create new program "ZRABARC01_TEST" (i use se38 for copy program from ZRABARC01)
and this new program will cal sapscript "ZAA_BARCODE_TEST" (i use se71 to copy this sapscript)
problem is when i execute program ZRABARC01_TEST
it's will show button "print barcode"
after press button . it's will show button "print preview "
when i press "print preview"
system show error =
***************************************************************
error message
there is no valid form
message no. ab 061
diagnosis
during the printing of barcodes, the system could not find a valid form.
either no form was selected, or the form selected is not active.
procedure
use a valid form. you can either use the sample supplied by sap , or modify it to your requirement. you maintain forms using the "form painter" SE71 transaction.
sapscript ZAA_BARCODE_TEST is active
and after that i press print button again.
there is error
ABAP runtime error LOOP_WITHIN_LOOP
what should i do to use program ZRABARC01_TEST to call sapscript ZAA_BARCODE_TEST ( sapscript ZAA_BARCODE_TEST active already)
and i wonder why when i use program ZRABARC01_test and call sapscript ZAA_BARCODE .
it's show the same error.
please help me.
got it
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
.................................................................
program code
pa_form = 'ZAA_BARCODE_TEST'.
LOOP.
AT FIRST.
Formular ๖ffnen
CALL FUNCTION 'FIAA_BARCODE_OPEN'
EXPORTING
i_form = pa_form.
ENDAT.
Zurckholen der Struktur ANLAV.
anlav = anlav_str.
Insert 03/11/2004 OaK
WRITE anlav-anln1 TO t-anln1 NO-ZERO.
l1 = strlen( t-anln1 ).
CASE l1.
WHEN '1'.
CONCATENATE '000000000000' t-anln1 INTO t-anln1.
WHEN '2'.
CONCATENATE '00000000000' t-anln1 INTO t-anln1.
WHEN '3'.
CONCATENATE '0000000000' t-anln1 INTO t-anln1.
WHEN '4'.
CONCATENATE '000000000' t-anln1 INTO t-anln1.
WHEN '5'.
CONCATENATE '00000000' t-anln1 INTO t-anln1.
WHEN '6'.
CONCATENATE '0000000' t-anln1 INTO t-anln1.
WHEN '7'.
CONCATENATE '000000' t-anln1 INTO t-anln1.
WHEN '8'.
CONCATENATE '00000' t-anln1 INTO t-anln1.
WHEN '9'.
CONCATENATE '0000' t-anln1 INTO t-anln1.
WHEN '10'.
CONCATENATE '000' t-anln1 INTO t-anln1.
WHEN '11'.
CONCATENATE '00' t-anln1 INTO t-anln1.
WHEN '12'.
CONCATENATE '0' t-anln1 INTO t-anln1.
ENDCASE.
*End of insert 03/11/2004 OaK
*Insert for Barcode printing 26/01/04
UNPACK anlav-anln1 TO t-anln1.
IF anlav-anln1+0(2) = '00'.
MOVE anlav-anln21(3) TO t-anln10(3).
ENDIF.
APPEND t.
*End of insert.
CALL FUNCTION 'Z_AA_BARCODE_PRINT'
EXPORTING
i_anlav = anlav
i_form = pa_form
TABLES
i_t = t.
*
CALL FUNCTION 'END_FORM'.
CALL FUNCTION 'START_FORM'
EXPORTING
form = pa_form
EXCEPTIONS
OTHERS = 8.
*
AT LAST .
Formular schliessen
CALL FUNCTION 'FIAA_BARCODE_CLOSE'
EXPORTING
i_form = pa_form.
ENDAT.
ENDLOOP.
ENDFORM.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Probably the problem or a problem is here:
CALL FUNCTION 'Z_AA_BARCODE_PRINT'
EXPORTING
i_anlav = anlav
i_form = pa_form
TABLES
i_t = t.
It seems you've created a copy of standard fm FIAA_BARCODE_OPEN, and u use it in your program but it stil uses the other standard fms FIAA_BARCODE*
I think all fms called FIAA_BARCODE* belong to the same function group, and u should consider the concept of function group: fms all the sam function group can be considerated as an unique program, so they can see the global data defined in the top-include of function group; a fm can set a variable to be used by another fm (of the same function group of course).
So u should copy all fms and use them instead of the standard ones.
Max
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.