SAP Script 'space' check in IF statement
Hi,
I want to check for space in SAP script
i want to check something like
/: IF &TS_ITEM-USPOS& EQ SPACE
ZD ...........
/: ENDIF
even if the there is space in uspos field this lines under are not printing.
your help is appriciated.
thanks
surya
Hi Surya,
It depends of the type of this field 'USPOS'.
If it's defined, for eg, like POSNR ( NUMC 6 )so the statement is :
/: IF &TS_ITEM-USPOS& EQ '000000'
Hope this helps,
Erwan
Similar Messages
-
To replace SAP script with smartform in customer statement using t-code F.27
Hi, I have a requirement to replace SAP script while generating a customer statement form using F.27 with Smartform. The standard program which triggers the SAP script is RFKORD11. Can anyone tell me how can we achieve this. Thanks in advance. BR, Karthik.
Hi
do you find a solution for your issue? Or did anyone else know how to send raw data instead of the pdf or fixed file from transaction F.61?
Thanks for any ideas or help
Axel -
Problem in Sap script for Check printing
Hi all,
I have problem in Check printing for FI Module. In Tcode f-58 i am taking the printout of checks. For my user they want to move the main window in upwards, but the sap script <b>F110_PRENUM_CHCK</b> not allowing to move upwards. how to do this, its urgent. plz
point wil be sure.
GowriHi
Copy the script F110_prenum_chek to some ZCHECK and do the changes.
Why you can't change the MAIN window towards up?
You can changes ths ize of it by adjusting the setting of it .
generally we use some pre printed stationary for this in which all the line item data with doc numbers is printed on top and the check will be in bottom
and in check we just print the few fields in the right positions.
<b>Reward points for useful Answers</b>
Regards
Anji -
In my sap script, i am using a standard text. Now I need to maintain this standard text for 2 languages.
I have created two standard text with name name ZCPQM_INSPECTION_RESULT and maintained differerent values for language EN and FR in SO10.
In script, i have to write it as
INCLUDE ZCPQM_INSPECTION_RESULT OBJECT TEXT ID ST LANGUAGE &lv_langu&.
Now I am not sure wher eto declare the variable lv_langu. Please helpHi Niti,
Do this way,
/: INCLUDE TESTTEXT OBJECT TEXT ID ST LANGUAGE &NAST-SPRAS&
this will include a SO10 Standard text "TESTTEXT" in the corresponding lagnuage in your form.
in SAP-Script you can not use statements like call funtion: edit_text, read_text, save_text, commit_text, delete_text.
to do so you need to jump off to an external perform like following:
/: Perform edit_text in program YSD_PERFORM
/: USING &NAST-SPRAS&
/: CHANGING &VARIABLE&
/: ENDPERFORM
Regards
Abhii... -
SAP SCRIPT function for converting to lowercase or uppercase
Hello,
Does anyone know an built-in function for printing fields in lower or uppercase with SAP SCRIPT
Regardshi,
Check this way..
DATA: DELIM(40) TYPE C VALUE ' '.
DATA: CON_ANREX LIKE Q0002-ANREX.
CALL FUNCTION 'STRING_UPPER_LOWER_CASE'
EXPORTING
DELIMITER = DELIM
STRING1 = RECORD-ANREX
IMPORTING
STRING = CON_ANREX
EXCEPTIONS
NOT_VALID = 1
TOO_LONG = 2
TOO_SMALL = 3.
IF SY-SUBRC EQ 0.
RECORD-ANREX = CON_ANREX.
ENDIF.
Regards,
Santosh -
Hi All,
I have written the below If statement in SAP scripts but when i execute the same the controll doent check the second line entries. If firtst line doesnot satisfy it goes to the else part. Kindly suggest what is wrong in this..
/: IF &T156T-BWART& = '321' OR &T156T-BWART& = '322' OR
/: &T156T-BWART& = '349' OR &T156T-BWART& = '350' OR
/: &T156T-BWART& = '312' OR &T156T-BWART& = '326' OR
/: &T156T-BWART& = '343' OR &T156T-BWART& = '344'.
/: ELSE
/: ENDIF.Hi neha,
Try to use the '/E' fo rnext line
/E->Extended line
Here is a code:
/: IF &T156T-BWART& = '321' OR &T156T-BWART& = '322' OR
/E &T156T-BWART& = '349' OR &T156T-BWART& = '350' OR
/E &T156T-BWART& = '312' OR &T156T-BWART& = '326' OR
/E &T156T-BWART& = '343' OR &T156T-BWART& = '344'.
/: ELSE
/: ENDIF.
Hope this helps you.
Regards,
Rajani -
How to use perform statements in sap scripts
how to use perform statements in sap scripts . and pls send me one progam for this
thnaks
rajaHi Raja,
<b>PERFORM</b> key work is used to include subroutine in sapscript form...
But the processing is lttle bit different form the one we use in ABAP.
Here the paramters passed to form is stored in internal table of name-value table. there are two table one for inbound parameter and other for outbound parameters.
Check out the example below to see how this is used..
<b>Definition in the SAPscript form:</b>
/: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
/: USING &PAGE&
/: USING &NEXTPAGE&
/: CHANGING &BARCODE&
/: ENDPERFORM
/ &BARCODE&
<b>Coding of the calling ABAP program:</b>
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 PAGE.
CHECK SY-SUBRC = 0.
PAGNUM = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY NEXTPAGE.
CHECK SY-SUBRC = 0.
NEXTPAGE = IN_PAR-VALUE.
READ TABLE OUT_PAR WITH KEY BARCODE.
CHECK SY-SUBRC = 0.
IF PAGNUM = 1.
OUT_PAR-VALUE = |. "First page
ELSE.
OUT_PAR-VALUE = ||. "Next page
ENDIF.
IF NEXTPAGE = 0.
OUT_PAR-VALUE+2 = L. "Flag: last page
ENDIF.
MODIFY OUT_PAR INDEX SY-TABIX.
ENDFORM.
Hope this is clear to understand...
Enjoy SAP.
Pankaj Singh. -
How To trigger last page in sap script of customer account statement
Hello all,
I am working on customer account statement.
It has it's own standard script(F140_CUS_STAT_02). But my client's requirement was completly diffrent,so i copied that to z script and made some changes like delete some window and some another window.
Now on first page , i have following windows,
1) Header
2) address
3) main
4) Account
5) Footer.
Next Page having following windows,
1) Header
2) Main
3) account
4) footer
Now i want to print account window on lsat page, so i put the condition nextpage = 0.
and it is working fine , but as account window is physically present after Main window , so that much blak sapge is getting creted after main window on every page.
To remove that blank space i am thinking of creting one more page and everytime i want display account window on that page.
I have creted the last page also. but in my output it not detecting that last page.
For First page - next page is next.
For Next page - next page is next.
for Last page- next page is last.
Also i have added following code at last in main window.
/: NEXT-PAGE LAST.
But i think i am placing this code at incorrect position in main window.
I am not able to find out the correct podition to put the above code,but main window of that script conataing so namy text element, and that text element are getting handled from driver program based on some conditions.
I have added my code in main window but not changed the original code.
Plz let me know where to write /: NEXT-PAGE LAST. in main window.
Or provide me some another solution to trigger thet last page in sap script.
Regards,
Anuja DhondgeHi ,
actually in account window i have used tha box command to print account statement.
Previously i was printing this account statement in main window itself but without using bottom and end bottom command.
So , as i made some changes or add some code in main window then lines of this account statement were getting dismental.
So my question is using bottom and end-bottom command this will happen or not???? -
How to leave half line space in SAP Script
Actually , I have a doubt regarding half line spacing on SAP Script ..
I am working on Cheque Printing with fbz5
Now the issue in the date, there are 8 box for the date in cheque .
i.e 0 2 0 7 2 0 1 4
Currently the date is comming on the cheque box ..like half up the box and half inside
IF I give one space in cheque window of my script with / its taking complete 1 space
and result is ,it going down ..with one space
I want to leave exact half line space ..so date is adjusted in the middle .
I also tried moving my cheque window from upper margin in all format(CH , CM , MM IN ..) above
But it is taking exact one space .Hi Darshit,
While creating the tab position, you have a option of line spacing.
make it to 0.5 lines, to make exact half line.
And also another way out, you can check by moving the 8 box created for the date up by 0.5 lines.
Regards,
Ganesh Lathi. -
Sap script perform statement.
hi all,
i have a problem with modifying standard sap script form. i have added a field in the line item of my form using perform statement in sap script. but only the corresponding to last line item is getting displayed for all.please help me on this issue my code and sap script is as follows.
**& Form material_wt
-->IN_TAB text
-->OUT_TAB text
FORM MATERIAL_WT TABLES in_tab STRUCTURE itcsy
out_tab STRUCTURE itcsy.
DATA : BEGIN OF IT_MAT OCCURS 0,
ZEILE LIKE J_1IEXCDTL-ZEILE,
MENGE LIKE J_1IEXCDTL-MENGE,
MATNR LIKE J_1IEXCDTL-MATNR,
NTGEW TYPE MARA-NTGEW,
END OF IT_MAT.
DATA : V_DOCNO TYPE J_1IEXCDTL-DOCNO,
V_NTWT TYPE CHAR20.
READ TABLE in_tab WITH KEY name = 'J_1IEXCDTL-DOCNO'.
CHECK sy-subrc = c_zero.
V_DOCNO = in_tab-value.
SELECT ZEILE MATNR MENGE INTO CORRESPONDING FIELDS OF TABLE IT_MAT FROM J_1IEXCDTL
WHERE DOCNO = V_DOCNO AND TRNTYP = '57FC'.
LOOP AT IT_MAT.
SELECT SINGLE NTGEW INTO IT_MAT-NTGEW FROM MARA WHERE MATNR = IT_MAT-MATNR.
modify it_mat.
ENDLOOP.
loop at it_mat.
IF not it_mat[] IS INITIAL.
READ TABLE out_tab WITH KEY name = 'NETWT'.
IF sy-subrc = 0.
V_NTWT = IT_MAT-NTGEW * IT_MAT-MENGE.
CONDENSE:V_NTWT.
out_tab-value = V_NTWT.
MODIFY out_tab INDEX sy-tabix.
ENDIF.
ENDIF.
endloop.
endform.
and my perform statement is as follows,
/E ITEM_VALUES
/: PERFORM MATERIAL_WT IN PROGRAM ZMM_RPT_CHALLAN
/: USING &J_1IEXCDTL-DOCNO&
/: CHANGING &NETWT&
/: ENDPERFORM
I1 &J_1IEXCDTL-ZEILE&,,&J_1IEXCDTL-MATNR&,,&NETWT&answered
-
Use of IF statement in SAP Scripts
Can u tell me how to use IF statement in SAP Scripts.
The problem is
if &sy-tabix& eq '1'
total
else
total1.
endif.
this sy-tabix is not workingi think sy-tabix will not work here....
do like this..
data : vtabix type i.
loop at itab.
vtabix = sy-tabix.
write_form...for the text element..
endloop.
in form layout
/: if &vtabix(c)& eq 1
/:endif
regards
shiba dutta -
How to print check box in sap script
I have a requirement in SAP Script to print a Check bok.
I tried using SAP symbols in the script, but it does not print. It inserts <679> for checkbox & <697> for marked checkbox. Any special command to be passed?
Regards,
Prabhu Rajesh.Hi,
Are you sure your printer is capable of printing graphics ?
Cheers
Colin. -
How to debugg particular statement in sap script
hi friends,
i want to know How to debugg particular statement in sap script.
plz reply.
thanks in advance,
regards
bhaskarhi
execute rstxdbug to activate script debugger...once the driver program reaches open_form, a popup box will come where u can mention the name of a command, call functinon, text element, etc to place a break point...once it gets into the debugging mode, double click on any line to set a break point, after that pressing f8 will get you to that line
if helpful, reward
Sathish. R -
Error "AND, OR or end of condition expected" in sap script IF statement
Hi all,
/: IF &WA_BSEG_IN-BUKRS& EQ '1000' OR &WA_BSEG_IN-BUKRS& EQ'2000'
= OR &WA_BSEG_IN-BUKRS& EQ '4000' OR &WA_BSEG_IN-BUKRS& EQ '5000'
/: CASE &WA_BSEG_IN-BLART&
/: WHEN 'DZ'
/: IF &SAVE_EVENT& EQ u2018ZPR01u2019 OR &SAVE_EVENT& EQ u2018ZPR06u2019
D1 <C4>Cheque Number/Bank Reference,,Payment Method,,Amount,,Cur,,</>
/: ENDIF
/: WHEN OTHERS
D1 <C4>Payment Method,,Cheque Number/Bank Reference,,Amount,,Cur,,</>
/: ENDCASE
/: ENDIF
I am getting below error in the the if statement (5th line) in sap script.
Error is "AND, OR or end of condition expected".
What is error in the 5th line?
Thanks in advanceHi,
In sap script, always give conditon in a sinlge line. Dont break the condition into many lines.
/: IF &WA_BSEG_IN-BUKRS& EQ '1000' OR &WA_BSEG_IN-BUKRS& EQ'2000' OR &WA_BSEG_IN-BUKRS& EQ '4000'
Thanks. -
SAP Script Check printing Layout, Line Items to display twice in First Page
Hi All,
This requirement is for US check printing Layout.
My Requirement is to display Items twice on the first page.
Eg : Main Window has 10 Items, I need to display all the Items at the bottom in another window at the bottom.
I can't create 2 Main windows in the first page, as the data from the Main window 1 overflows to Main window 2 in the first page.
I copied print program RFFOUS_C into a Z-version and try to implement the logic, however unable to print the line items in the bottom window.
Kindly give your valuable Inputs.
Thanks
VinayakHi
I had the same request for a check form in Canada. I solved it by writing the line item output into variables and print these variables in a second window. It was ~10 hours of effort, not a real nice technical solution but it worked.
If you require I can send you a PDF of the sap script form definition. You can contact me at [email protected] Answers can take 1 week or more.
Best regards
JD
Maybe you are looking for
-
Make sure Compressor 3.5.3 uses Qmaster cluster
How do you make sure Compressor 3.5.3 uses the Q master cluster? I know you have to set up Qmaster, but I don't know what the settings are supposed to be. My MacPro 2,1 has 8 cores. Also, how do you tell if your version of Compressor is running as 3
-
Vendor Quality Certificate - upload to R/3
Dear Guys, Here is my Quick Question The scenario is like this, the client Receive the Quality certificate from the vendor , for the purchased materials as Hard copy The client wants to scan the Vendor Quality certificate and upload to sap shall i de
-
Hi All, I want to create a interactive report in crm7 .0.can any body help in interactive report.how to create a interactive in crm 7.0. Thanks in advance. Vishwas
-
Help with itunes - 'quit unexpectedly' and crashing all the time now
What's going on with iTunes? It crashes all the time on me now - help, anyone?? here's a recent error report Process: iTunes [62186] Path: /Applications/iTunes.app/Contents/MacOS/iTunes Identifier: com.apple.iTunes Version:
-
16:9 footage/menu is displayed as 4:3 on final DVD
Hello... Recently i installed Windows Vista and have been testing my adobe video products.. so far.. far better performance than XP on my dell dimension 2350. I own a sony HDR-HC3 high definition camcorder. The other day i imported the full quality i