Regarding subroutine in script
hi friends,
i am calling suroutine in script i write in main window of script this
/: PERFORM ZVEND IN PROGRAM ZRFI_CONF_SUB
/: USING &BSIK-LIFNR&
/:USING &BSIK-BUDAT&
/:ENDPERFORM .
i created subroutine pool ZRFI_CONF_SUB.
but when i am debugging form it is not going in that subroutine
where i am wrong plz reply me .
regards,
sonu
hi anji,
i am pesting my code plz plz help me plz go through the code .
in script
PERFORM ZVEND IN PROGRAM ZRFI_CONF_SUB
USING &BSIK-LIFNR&
USING &BSIK-BUDAT&
ENDPERFORM
*& Subroutine pool ZRFI_CONF_SUB *
PROGRAM ZRFI_CONF_SUB.
DATA : BEGIN OF I_BSID OCCURS 0,
KUNNR LIKE BSID-KUNNR,
WRBTR LIKE BSID-WRBTR,
BUDAT LIKE BSID-BUDAT,
SHKZG like BSID-shkzg,
BSTAT LIKE BSID-BSTAT,
END OF I_BSID.
DATA : BEGIN OF I_BSAD OCCURS 0,
KUNNR LIKE BSAD-KUNNR,
WRBTR LIKE BSAD-WRBTR,
BUDAT LIKE BSAD-BUDAT,
SHKZG like BSAD-SHKZG,
BSTAT LIKE BSAD-BSTAT,
END OF I_BSAD.
DATA : BEGIN OF I_BSIK OCCURS 0,
LIFNR LIKE BSIK-LIFNR,
WRBTR LIKE BSIK-WRBTR,
BUDAT LIKE BSIK-BUDAT,
shkzg like bsik-shkzg,
BSTAT LIKE BSIK-BSTAT,
END OF I_BSIK.
DATA : BEGIN OF I_BSAK OCCURS 0,
LIFNR LIKE BSAK-LIFNR,
WRBTR LIKE BSAK-WRBTR,
BUDAT LIKE BSAK-BUDAT,
shkzg like bsak-shkzg,
BSTAT LIKE BSAK-BSTAT,
END OF I_BSAK.
*****This is form to get the total in Vendor Bal.ConformationForm*****
FORM ZVEND TABLES IN_BSIK STRUCTURE ITCSY
OUT_BSIK STRUCTURE ITCSY.
data : year(4),
month(2),
day(2),
date(8).
DATA : V_AMNT TYPE P DECIMALS 2,
V_AMT TYPE P DECIMALS 2,
V_TOT TYPE P DECIMALS 2,
V_TOTAL(20),
V_LIFNR(10) TYPE N,
V_BUDAT(10),
V_WRBTR LIKE BSID-WRBTR.
READ TABLE IN_BSIK INDEX 1.
V_LIFNR = IN_BSIK-VALUE.
READ TABLE IN_BSIK INDEX 2.
V_BUDAT = IN_BSIK-VALUE.
year = V_BUDAT+6(4).
month = V_BUDAT+3(2).
day = V_BUDAT+0(2).
CONCATENATE year month day into date.
SELECT LIFNR WRBTR BUDAT SHKZG BSTAT FROM BSIK
INTO table I_BSIK
WHERE LIFNR = V_LIFNR.
SELECT LIFNR WRBTR BUDAT SHKZG BSTAT FROM BSAK
INTO table I_BSAK
WHERE LIFNR = V_LIFNR.
LOOP AT I_BSIK WHERE LIFNR = V_LIFNR.
if i_bsik-BUDAT <= date and i_bsik-bstat ne 'S'.
if i_bsik-shkzg = 'S' .
V_AMNT = V_AMNT + I_BSIK-WRBTR .
else.
V_AMNT = V_AMNT - I_BSIK-WRBTR.
endif.
endif.
ENDLOOP.
LOOP AT I_BSAK WHERE LIFNR = V_LIFNR.
if i_bsak-BUDAT <= date and i_bsak-bstat ne 'S'.
if i_bsak-shkzg = 'S'.
V_AMT = V_AMT + I_BSAK-WRBTR .
else.
V_AMT = V_AMT - I_BSAK-WRBTR.
endif.
endif.
ENDLOOP.
V_TOT = V_AMNT + V_AMT.
V_TOTAL = V_TOT.
READ TABLE OUT_BSIK INDEX 1.
OUT_BSIK-VALUE = V_TOTAL.
MODIFY OUT_BSIK INDEX 1.
ENDFORM. "ZVEND
**This is form to get the total in Customer Bal.Conformation Form*****
FORM ZCUST TABLES IN_BSID STRUCTURE ITCSY
OUT_BSID STRUCTURE ITCSY.
data : year(4),
month(2),
day(2),
date(8).
DATA : V_AMNT TYPE P DECIMALS 2,
V_AMT TYPE P DECIMALS 2,
V_TOT TYPE P DECIMALS 2,
V_TOTAL(20),
V_KUNNR(10) type n,
V_BUDAT(10),
V_WRBTR LIKE BSID-WRBTR.
READ TABLE IN_BSID INDEX 1.
V_KUNNR = IN_BSID-VALUE.
READ TABLE IN_BSID INDEX 2.
V_BUDAT = IN_BSID-VALUE.
year = V_BUDAT+6(4).
month = V_BUDAT+3(2).
day = V_BUDAT+0(2).
CONCATENATE year month day into date.
SELECT KUNNR WRBTR BUDAT SHKZG BSTAT FROM BSID
INTO table I_BSID
WHERE KUNNR = V_KUNNR.
SELECT KUNNR WRBTR BUDAT SHKZG BSTAT FROM BSAD
INTO table I_BSAD
WHERE KUNNR = V_KUNNR.
LOOP AT I_BSID WHERE KUNNR = V_KUNNR.
if i_bsid-BUDAT <= date and i_bsid-bstat ne 'S'.
if i_bsid-shkzg = 'S' .
V_AMNT = V_AMNT + I_BSID-WRBTR .
else.
V_AMNT = V_AMNT - I_BSID-WRBTR.
endif.
endif.
ENDLOOP.
LOOP AT I_BSAD WHERE KUNNR = V_KUNNR.
if i_bsad-BUDAT <= date and i_bsad-bstat ne 'S'.
if i_bsad-shkzg = 'S'.
V_AMT = V_AMT + I_BSAD-WRBTR .
else.
V_AMT = V_AMT - I_BSAD-WRBTR.
endif.
endif.
ENDLOOP.
V_TOT = V_AMNT + V_AMT.
V_TOTAL = V_TOT.
READ TABLE OUT_BSID INDEX 1.
OUT_BSID-VALUE = V_TOTAL.
MODIFY OUT_BSID INDEX 1.
ENDFORM. "ZCUST
Similar Messages
-
Subroutine in script. REWARDED
Hi All,
Please give me a sample and easy code
for calling subroutine in script
subroutine defination zprogram which is having a select statement.
every helpful answere is rewarded surely.hi priyanka,
sample code for routines in script.
/: PERFORM FORM_TEST IN PROGRAM ZTEST
/: USING &VAR1&
/: USING &VAR2&
/: USING &VAR3&
/: USING &VARN&
/: CHANGING &VAR_OUT1&
/: CHANGING &VAR_OUTN&
in the program ZTEST...
FORM FORM_TEST tables in_tab structure itcsy
out_tab structure itcsy.
Get value of VARN
data: varn like ....
read table in_tab with key name = 'VARN'.
if sy-subrc = 0.
move in_tab-value to varn.
endif.
Update the value of VAR_OUTN
read table out_tab with key name = 'VAR_OUTN'.
if sy-subrc = 0.
move <value> to out_tab-value.
modify out_tab index sy-tabix.
endif.
ENDFORM.
check this link too...
http://help.sap.com/saphelp_erp2005/helpdata/en/d1/803279454211d189710000e8322d00/frameset.htm
Regards...
Arun.
Reward points if useful. -
how to call subroutines in scripts
Hi
When you don't have option to change the driver program connected to the script, and when you wants to bring some external data from other tables and to do external calculations we use these subroutines in scripts
See the sample programs for calling subroutines
How to call a subroutine form SAPscripts
The Form :
/:PERFORM CDE_CENT IN PROGRAM ZKRPMM_PERFORM_Z1MEDRUCK
/:USING &EKKO-EBELN&
/:CHANGING &CDECENT&
/:ENDPERFORM
The report :
REPORT zkrpmm_perform_z1medruck .
DATA : BEGIN OF it_input_table OCCURS 10.
INCLUDE STRUCTURE itcsy.
DATA : END OF it_input_table.
déclaration de la table output_table contenant les
variables exportées
DATA : BEGIN OF it_output_table OCCURS 0.
INCLUDE STRUCTURE itcsy.
DATA : END OF it_output_table.
DATA : w_ebeln LIKE ekko-ebeln,
w_vbeln LIKE vbak-vbeln,
w_zcdffa LIKE vbak-zcdffa.
FORM CDE_CENT
FORM cde_cent TABLES input output.
it_input_table[] = input[].
it_output_table[] = output[].
READ TABLE it_input_table INDEX 1.
MOVE it_input_table-value TO w_ebeln.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = w_ebeln
IMPORTING
output = w_ebeln.
SELECT SINGLE zcdffa FROM ekko
INTO w_zcdffa
WHERE ebeln = w_ebeln.
it_output_table-name = 'CDECENT'.
MOVE w_zcdffa TO it_output_table-value.
MODIFY it_output_table INDEX 1.
output[] = it_output_table[].
ENDFORM.
REPORT ZMPO1 .
form get_freight tables in_par structure itcsy out_par structure itcsy.
tables: ekko,konv,t685t.
data: begin of itab occurs 0,
ebeln like ekko-ebeln,
knumv like ekko-knumv,
end of itab.
data: begin of itab1 occurs 0,
knumv like konv-knumv,
kposn like konv-kposn,
kschl like konv-kschl,
kbetr like konv-kbetr,
waers like konv-waers,
kwert like konv-kwert,
end of itab1.
data: begin of iout occurs 0,
kschl like konv-kschl,
vtext like t685t-vtext,
kbetr like konv-kbetr,
kwert like konv-kwert,
end of iout.
data v_po like ekko-ebeln.
read table in_par with key 'EKKO-EBELN'.
if sy-subrc = 0.
v_po = in_par-value.
select
ebeln
knumv
from ekko
into table itab
where ebeln = v_po.
if sy-subrc = 0.
loop at itab.
select
knumv
kposn
kschl
kbetr
waers
kwert
into table itab1
from konv
where knumv = itab-knumv and
kappl = 'M'.
endloop.
loop at itab1.
if itab1-kposn <> 0.
select single * from t685t
where kschl = itab1-kschl
and kappl = 'M'
and spras = 'EN'.
iout-vtext = t685t-vtext.
iout-kschl = itab1-kschl.
iout-kbetr = itab1-kbetr.
iout-kwert = itab1-kwert.
append iout.
clear iout.
endif.
endloop.
sort itab1 by kposn.
loop at iout.
sort iout by kschl.
if ( iout-kschl eq 'GSDC' OR
iout-kschl eq 'GSFR' OR
iout-kschl eq 'GSIR' ).
at end of kschl.
read table iout index sy-tabix.
sum.
write:/ iout-kschl,iout-vtext,iout-kwert.
out_par-name = 'A1'.
out_par-value = iout-vtext.
append out_par.
out_par-name = 'A2'.
out_par-value = iout-kwert.
append out_par.
endat.
endif.
endloop.
endif.
endif.
endform.
IN THE FORM I AM WRITING THIS CODE.
/:DEFINE &A1& = ' '
/:DEFINE &A2& = ' '
/:PERFORM GET_FREIGHT IN PROGRAM ZMFORM_PO1
/:USING &EKKO-EBELN&
/:CHANGING &A1&
/:CHANGING &A2&
/:ENDPERFORM
&A1&
&A2&
This Code is to be written in the PO form under ADDRESS window.
/:DEFINE &A1& = ' '
/:DEFINE &A2& = ' '
/:DEFINE &A3& = ' '
/:DEFINE &A4& = ' '
/:DEFINE &A5& = ' '
/:DEFINE &A6& = ' '
/:PERFORM GET_VENDOR IN PROGRAM ZMFORM_PO
/:USING &EKKO-EBELN&
/:CHANGING &A1&
/:CHANGING &A2&
/:CHANGING &A3&
/:CHANGING &A4&
/:CHANGING &A5&
/:CHANGING &A6&
/:ENDPERFORM
&A1&
&A2&
&A3&
&A4&
&A5&
&A6&
Reward points for useful Answers
Regards
Anji -
hi friends...
i need to know where we use subroutines in scripts..... further is it really necessary to use the same ...since using subroutines reduces performance!!!!!Hi..,
<b>
In some case we need to do some mathematical operations in scripts !! Those things we cant do in Script Editor !! thats y the subroutines are there in scripts !!</b>
You can use the PERFORM command to call an ABAP subroutine (form) from any program, subject to the normal ABAP runtime authorization checking. You can use such calls to subroutines for carrying out calculations, for obtaining data from the database that is needed at display or print time, for formatting data, and so on.
PERFORM commands, like all control commands, are executed when a document is formatted for display or printing. Communication between a subroutine that you call and the document is by way of symbols whose values are set in the subroutine.
<b>Syntax in a form window:
/: PERFORM <form> IN PROGRAM <prog>
/: USING &INVAR1&
/: USING &INVAR2&
/: CHANGING &OUTVAR1&
/: CHANGING &OUTVAR2&
/: ENDPERFORM
INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.
OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.
The ABAP subroutine called via the command line stated above must be defined in the ABAP report prog as follows:
FORM <form> TABLES IN_TAB STRUCTURE ITCSY
OUT_TAB STRUCTURE ITCSY.
ENDFORM.</b>
regards,
sai ramesh -
Passing Currency field to external subroutine from script
Hi,
I am passing one currency field to external subroutine from script. In subroutine we can get that currency in character format. I want to convert that into currency format. how can i do that?
thnk ueasy conversion:
number = character_parameter -
Error while sending data to a subroutine in script
Hi,
While passing a currency field for calculation to a subroutine through perform statement iam getting runtime error saying "unable ti interpret 5000.00 as a number. 5000.00 is nothing but the first currency value which iam sending for calculation.in the code the error is raised on the bold line .
rf140-wrshb has value 5000.00 .the code which i have written in subroutine is as follows.
READ TABLE I_IN WITH KEY NAME = 'RF140-WRSHB'.
MOVE I_IN-VALUE TO LV_SUM1.
CLEAR I_IN.
DATA: SUM_C TYPE N.
SUM1 = SUM1 + LV_SUM1.
READ TABLE I_OUT WITH KEY NAME = 'LV_BALANCE'.
MOVE SUM1 TO I_OUT-VALUE.
MODIFY I_OUT TRANSPORTING VALUE WHERE NAME = 'LV_BALANCE'.
CLEAR I_OUT.
lv_balance is the one which receives the output value.
can anyone tell me what is the mistake i have done nd how to rectify it.
Thanks,
Rose.Hi,
I have done something similar so below is the code while passing currency fields to subroutines:
Actually I was retrieving 2 fields from scripts and then substract them and then send back the result to the script. Hope it works out for you, try it out and REWARD POINTS IF HELPFUL!! (also for your prev post!!)
FORM get_pay TABLES in_tab STRUCTURE itcsy out_tab STRUCTURE itcsy.
DATA: lv_var(255) TYPE c, "dmbtr,
lv_var1(255) TYPE c, "qsshb,
lv_var2(255) TYPE c, "dmbtr.
var(20) TYPE c,
var1(25) TYPE c,
var2(25) TYPE c,
var3(25) TYPE c,
var4(25) TYPE c,
var5(25) TYPE c,
var6(25) TYPE c,
vari TYPE ztemp,
vari2 TYPE ztemp,
vari3 TYPE ztemp.
DATA: lv_var4 TYPE dmbtr,
lv_var5 TYPE qsshb,
lv_var6 TYPE dmbtr,
len TYPE i,
len1 TYPE i,
dot TYPE c.
READ TABLE in_tab WITH KEY 'REGUP-DMBTR'.
IF sy-subrc EQ 0.
lv_var = in_tab-value.
len = STRLEN( lv_var ).
len1 = len - 3.
dot = lv_var+len1(1).
IF dot = ','.
SPLIT lv_var AT ',' INTO var1 var2.
REPLACE '.' IN var1 WITH ','.
CONCATENATE '.' var2 INTO var2.
CONCATENATE var1 var2 INTO var.
CONDENSE var.
vari = var1.
SHIFT vari LEFT DELETING LEADING '0'.
CONCATENATE vari var2 INTO vari.
lv_var4 = vari.
ELSE.
SPLIT lv_var AT '.' INTO var1 var2.
REPLACE '.' IN var1 WITH ','.
CONCATENATE '.' var2 INTO var2.
CONCATENATE var1 var2 INTO var.
CONDENSE var.
vari = var1.
SHIFT vari LEFT DELETING LEADING '0'.
CONCATENATE vari var2 INTO vari.
lv_var4 = vari.
ENDIF.
CLEAR: dot, len, len1.
ENDIF.
lv_var = vari.
CALL FUNCTION 'CHAR_NUMC_CONVERSION'
EXPORTING
input = lv_var
IMPORTING
numcstr = lv_var4.
READ TABLE in_tab WITH KEY 'REGUP-QBSHB'.
IF sy-subrc EQ 0.
lv_var1 = in_tab-value.
len = STRLEN( lv_var1 ).
len1 = len - 3.
dot = lv_var1+len1(1).
IF dot = ','.
SPLIT lv_var1 AT ',' INTO var3 var4.
REPLACE '.' IN var3 WITH ','.
CONCATENATE '.' var4 INTO var4.
CONDENSE var.
vari2 = var3.
SHIFT vari2 LEFT DELETING LEADING '0'.
CONCATENATE vari2 var4 INTO vari2.
lv_var6 = vari2.
ELSE.
SPLIT lv_var1 AT '.' INTO var3 var4.
REPLACE '.' IN var3 WITH ','.
CONCATENATE '.' var4 INTO var4.
CONDENSE var.
vari2 = var3.
SHIFT vari2 LEFT DELETING LEADING '0'.
CONCATENATE vari2 var4 INTO vari2.
lv_var6 = vari2.
ENDIF.
CLEAR: dot, len, len1.
ENDIF.
lv_var1 = vari2.
CALL FUNCTION 'CHAR_NUMC_CONVERSION'
EXPORTING
input = lv_var1
IMPORTING
numcstr = lv_var6.
lv_var5 = lv_var4 - lv_var6.
lv_var2 = lv_var5.
var = lv_var5.
WRITE lv_var5 TO var CURRENCY 'SG'.
READ TABLE out_tab WITH KEY 'LV_PAY'.
IF sy-subrc EQ 0.
out_tab-value = var.
MODIFY out_tab INDEX 1.
ENDIF.
ENDFORM. "get_PAY
Regards,
Narendra. -
Hi folks,
i want to print purchase order number and document date in purchase order form in seprate window.the purchase order number iam giving in selection-screen that number i want to display. for this iam writing code in subroutine.but the data is not fetching.
can u please provide me sample coding or example for this.
Thx in advance,
Neelima.NHi,
Are you using Standard Script copied or created your own one.
If standard script copied with standard print program, in your created window, give this values &EKKO-EBELN&&' / 'EKKO-BEDAT&
If Custom created script, in the Window give the selection field declared for EBELN and for BEDATin driver program.
&P_EBELN& &P_BEDAT&
Regards
Bala Krishna -
hi!
We know that subroutines are possible in main window of script.
Is it possible to write subroutines in constant and variable windows as well?Hi,
subroutines can be called with in all windows
of sapscript
perform add in progarm(ztest) using a b .
Regards
amole -
Hi Abapers,
Now i am doing a sapscript.In that script i uploaded one logo.That logo is appeared in spool request but not coming in actuval(paper) print out.Can you please give me the proper solution for this one.I uploaded that logo in tiff file formate.
Thanks & Regards,
Bujji.Hi,
Check the window size that image is fitted or not.
Check your include statement.
If not do it again.create GRAPHIC window and include logo again.
UP ur logo through SE78 into ur graphic window.
make sure that ur image must be saved in .bmp or .tiff
thats all.
Thanks.
If this helps u reward with points. -
Regarding subroutine (Form-EndForm)
How do I trigger a Subroutine ( It creates a new ticket/insurance claim number/Invoice number) only when print command is given and not when print preview is given so that un-necessarily new ticket/claim/invoice NUMBERS are not generated?
Hi,
So it is a script or the smartform ?
In the sap script you can call the perform as shown below
You could make a condition to call the below subroutine in sap script window editor.
Example: if sy-ucomm = 'PRINT '.
perform TABLES fp_it_intab STRUCTURE itcsy
fp_it_outtab STRUCTURE itcsy.
Endform.
Please let me know if you want the fuction code for print command.
Edited by: Ashwin Kumar Chitram on Oct 1, 2011 7:21 AM -
Error while calling Subroutine from Script
HI Friends,
I am getting a short dump whilecalling a suboutine from Script.
Please suggest if am wrong with below code
/: PERFORM GET_ADDRESS IN PROGRAM ZSUBROUTINES
/: USING &MHND-KUNNR&
/: CHANGING &ADRS-LINE0&
/: CHANGING &ADRS-LINE1&
/: ENDPERFORM
All above fields are available in script window
In the program
FORM get_address TABLES in_tab STRUCTURE itcsy
out_tab stucture itcsy.
ENDFORM.
ThanksHI,
Your code is correct, in the FORM and ENDFORM in the program, read the INPUT table and get the values and write your logic using these values and send back the values to the SCRIPT using the OUTTABLE. here you need to use the MODIFY statment for the outtable using Sy-TABIX.
Regards
Sudheer -
Regarding translations in scripts
Hi All,
I am facing a problem while translating a script from EN lang to say FR lang in se76 T-code.
In the main window, there are many elements to be translated and each element will have its own texts to be translated. During translation, we get the english text in teh non editable mode and the text that is to be translated into other lang in editable mode.
All the elements are getting translated except one Element. I am not able to understnad why that particular element is not getting translated. The editable window for that particular element is not getting displayed even when i want to translate it.
Can anybody help me out reg this problem. I want to translate the text presen tin taht particular element whichis not happening.. Pl let m e know what the problem might be and the solution to this as this is v important...
Regards,
PriyaHey bharath,
Thanks for the reply. But, can uplz help me out in doing the translation using se63 in ECC6.0? I had tried it out but as i could not know how to proceed with, i started translating it using se76.
Can u plz let me know the same process using se63 in 6.0?
Regards,
Priya -
Hi All,
I need to diplay one field in script to barcode.I got some code regarding this through some internet site.May i know the meaning of this code.Specially for
(s1p&XDIM&,&YDIM&,&MODHEIGHT&,0s24670T
(s1p40v10,30b10,30s24670T
these two lines.what does this code do.
Actual Code is:
/: DEFINE &XDIM& = 2
/: DEFINE &YDIM& = 3
/: DEFINE &MODHEIGHT& = 3
<FS><32>
/: PRINT-CONTROL SESCP
/* (s1p&XDIM&,&YDIM&,&MODHEIGHT&,0s24670T
= (s1p40v10,30b10,30s24670T
&VBLKK-VBELN&
/: PRINT-CONTROL SBS01
HI Delivery Number:,,&VBLKK-VBELN&
Bye
BujjiHi,
/* (s1p&XDIM&,&YDIM&,&MODHEIGHT&,0s24670T
is a commented line.
/* signifies comment.
Kindly reward points by clicking the star on the left of reply,if it helps.
Check this link for more about Barcodes.
http://www.sap-img.com/abap/details-information-about-sap-barcodes.htm
Message was edited by: Jayanthi Jayaraman -
Calling subroutine from scripts
I am calling a subroutine form a standard text, the subroutine is getting called but the input table is comming empty.
can any one please advise me what could be the problem.
/:PERFORM GET_APP_DATA IN PROGRAM YHR_APP_DATA
/:USING &P0001-PERNR&
/:CHANGING &GRADE&
/:ENDPERFORMCheck this sample code...may be it will help u to identify the prob...
Definition in the SAPscript form:
/: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
/: USING &PAGE&
/: USING &NEXTPAGE&
/: CHANGING &BARCODE&
/: ENDPERFORM
/ &BARCODE&
Coding of the calling ABAP program:
REPORT QCJPERFO.
FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
DATA: PAGNUM LIKE SY-TABIX, "page number
NEXTPAGE LIKE SY-TABIX. "number of next page
READ TABLE IN_PAR WITH KEY u2018PAGEu2019.
CHECK SY-SUBRC = 0.
PAGNUM = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY u2018NEXTPAGEu2019.
CHECK SY-SUBRC = 0.
NEXTPAGE = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY u2018BARCODEu2019.
CHECK SY-SUBRC = 0.
IF PAGNUM = 1.
OUT_PAR-VALUE = u2018|u2019. "First page
ELSE.
OUT_PAR-VALUE = u2018||u2019. "Next page
ENDIF.
IF NEXTPAGE = 0.
OUT_PAR-VALUE+2 = u2018Lu2019. "Flag: last page
ENDIF.
MODIFY OUT_PAR INDEX SY-TABIX.
ENDFORM.
Regards,
JOy. -
Hi,
Could any one tell me is that possible to use external subroutine. Actually my script is the output of ML83. Driver program which passing the info. to script is Std one. Is there any filed relavent to this driver program is updating when 'Service entry is revoked'. Plz help me out... this is very urgent.
Thanks
Sai.Hi,
'Service entry is revoked' means blocked or released..
Sorry..I am not an expert on Service entry..But I am trying to search for the fields which you are looking for..
Thanks,
Naren
Maybe you are looking for
-
Getting input from textbox as "console"
Hi all. I am learning C# and have a Windows forms project that I am working on to learn various techniques. Basically it has a text box that I use to mimic a console. The user enters a command followed by the Enter key and the program reads that in a
-
Upgrade to Snow Leopard disabled iPhoto editing capabilities
Upgraded to Snow Leopard, using iPhoto 8.1 (415). Problem: Scanned numerous photographs at color 600 dpi on Canon Pixma500, then exported scans to jpeg, then imported into iPhoto Result: Many will not edit. Here are the symptoms: (1) Using full scree
-
Opening new Album in iPhoto 11
I have tried multiple options to open a new Album, but each time I open and name, it contains the entire iPhoto library. I have more than 30 Albums and never had any issue with the old system.
-
What is the fastest way to contact Apple?
Since you told me that you sent me 2 e-mails. I have not received any of them at this time. I imagine it could be that my server is too slow!?? Thank you in advance. Barbara Cronk
-
Installed Skype and my email was hacked w/i hours
I'm not sure I want to use this program if it's that unsecure. Gmail notified me this morning that someone from Luxembourg, showing a Skype IP, tried to hack my account only hours after I installed Skype. I hadn't even USED Skype yet, except for the