How to change sign negative to positive in sap script form
Hi Guru,
I had wriiten a below piece of code in my sap script form.Now I need all the negative sign to be convert to positive number means
if KOMVD-KWERT = 123,98.00- , then require 123,98.00 ..
And for this I know the synatax is
&KOMVD-KWERT(S)& .Bur the probleam is how to manage this (I13) ...Because if i am wriiting
&KOMVD-KWERT(S)(I13)& getting no value ...Please help..
IF &TNAPR-KSCHL& = 'ZD06'.
&KOMVD-KWERT(I13)&
endif.
Thanks
susri
Hi SUSRIKANT,
You can try this logic .
DATA : LV_KWERT TYPE STRING,
LV_LEN TYPE I,
LV_F_KWERT TYPE STRING.
LV_KWERT = KOMVD-KWERT.
LV_LEN = STRLEN( LV_KWERT ).
LV_LEN = LV_LEN - 1.
IF LV_KWERT +LV_LEN(1) = '-'.
LV_F_KWERT = LV_KWERT + 0 (LV_LEN).
ELSE.
LV_F_KWERT = LV_KWERT.
ENDIF.
I hope this logic will be helpful for your issue.
Thanks & Regards,
Kumaran Duraiswamy.
Similar Messages
-
How to put footer in the Delivery note sap script form.
Hi All,
i am new to SAP SCRIPT , can any one guide us how to Create a footer in the Delivery note sap script.
I need to put some message if the stock of the material is "0"(zero).
can anyone tell me the process to do this.
Thanks
Channappa SajjanarHi,
U create a window in script (Footer), and in the Driver program call this window at last..
eg:
create a window in script and call it at the end in the layout..
/E FOOTER
P1 'Write Required text what u want to display;.
now in print program, after printing all the line items in ur internal table call the FM write_form to print the footer...
LOOP AT itab.
call function 'WRITE_FORM'
exporting
window = 'MAIN'
exceptions
others = 1.
endloop.
now call, FM write_form to print the footer
IF stock EQ 0.
call function 'WRITE_FORM'
exporting
window = 'FOOTER'
element = 'FOOTER'
exceptions
others = 1.
endif.
Hope it helps!!
Rgds,
Pavan -
How to list ABAP programs that uses a SAP script form?
Hello everybody.
Can you please tell me how to list all ABAP programs that uses a particular SAPscript forms? That is, given a form name, I can then list all programs that uses that form.
Thanks in advance. I'm trying to Google this same info but I'm having a hard time formulating my search terms.
Thanks.
-- CarlHi Carl,
You can get them from table TNAPR,
Give the FORM NAME and all the programs are listed
check this table also TTFXP , TTXFPT
Message was edited by: Chandrasekhar Jagarlamudi
Message was edited by: Chandrasekhar Jagarlamudi -
How do I change colour negative to positive?
How do I change colour negative to positive?
Using the application Final Cut Express?
Are you speaking of a film negative for a photograph?
You can edit the image to the timeline, then go Effects Tab > Video Filters > Channel > Invert and apply the Invert effect to the clip on the timeline.
Note that film negatives do not render color correctly when inverted. When they were printed, color correction "packs" were applied that were emulsion specific to balance the latent color skew present in the negative image.
So you will also need to then add the effect Video Filters > Color Correction > Color Corrector and make further adjustments.
MtD -
How to change the color of the text field of form
Hi ,
Is there any way to change the color of the text field of the form........
Thnx in advance .......
Cheers,
EmanHi Bob. I'm new to these forums and I'm not sure of protocol and exactly how this is supposed to work, so If I'm doing this wrong then please excuse me and let me know.
I liked you solution on 'How to change the color of an Item on a form' using <blink>.
I'm new to this application and coding as well so its kind of foreign to me.
Working on a Report Page,
I would like to have item, :P1_JOB_NO blink when the difference between sysdate and :P1_DATE_DUE < 7 days.
I can identify the job_no which should blink by using the sql statement:
SQL> select job_no from oax_projects07 where
2 (sysdate - date_due < 7) and
3 emp_name = 'GARY PILKENTON';
JOB_NO
20060627 050
But I dont know the proper syntax to make it blink,
or when to plug the syntax into.
ie, is it a process, a validation, etc.
Do you have any advice for me? -
How to change the field length in standard sap program.
Hi All,
How to change the field length in standard sap program.
Urgent
Example:
Text1 type c length 75,
To change :
Text1 type c length 150,
Point will be rewarded..
Thank you,
Vikram.CIf the only solution is to change the sap standard program, simply change the program, it will prompt for an access key. This key can be retrieved in the SAP support portal (service.sap.com) at keys and requests, sccr keys, register object.
Sometimes these actions are outsourced to a competence center, so maybe youre not entitled to do this, in any case ask a resident senior developer for support.
regards, Rob -
How to change spare part item price in sap
Dear All,
Can you tell me how to change spare part item price in sap ,
like in our company hike new price of spare part item so how can update a new price in bluk order
thankx and Regards
PritpalHi,
Try MR21 & MR22.
First assign the appropriate G/L account against the account key for the same.
Regards,
Sourabh -
How to get the last page SAP Script form
How to get the last page SAP Script form.
I want to print a specific information in the last page of SAP form (Script). Please tell me how to get the last page number.
RegardsHi
You have to check the system variable &NEXTPAGE&, if it's 0 it means you're in the last page.
From SAP Help:
This symbol is used to print the number of the following page. The output format is the same as with &PAGE& .
Note that on the last page of the output, in each window that is not of type MAIN, &NEXTPAGE& has the value 0.
/: IF &NEXTPAGE& = '0'
Last page
/: ENDIF
Max -
How to View Smartforms or SAP Script Forms in Web Dynpro ABAP
Do anyone have idea of how to View Smartforms or SAP Script Forms in Web Dynpro ABAP?
Please let me know. ThanksHi Sameeksha,
You can display an smartform in WDA as an pdf file. Try go through this [article |https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0de1eb8-0b98-2910-7996-8a3c2fcf6785]where Nanda does explain about the same.
Regards,
Uday -
How to find the print program for a sap script
Hey Experts,
How to find the print program for a sap script (espicially when it is a custom script(Z*))?
Thanks a ton,Thanx Vijay,
Actually when I searched for the program in both the tables it didnt show up ther.
But when I did check in the texts of script, I found it.
Good job.
Thanks all.
Vijay, a small doubt.
But why didn't it show up in those 2 tables when all the print programs for standard scripts show up usually?
thnx once again.
Message was edited by: dev a -
How to set the position in SAP Script
Hi Professionals,
Can anyone tell me that How can I set the position of an bitmap Image (after inserting) in SAP Script ?
by default position is in Left, I need to align it in center or somewhere else.
Anybody knows, kindly reply!
Thanks
DevinderHi,
But Can we assign a window under another window. Because I want to insert a bmp picture on particular position.
example:- there is a digital signature and wanted to insert upon a name.
So, there is a text (which is customer name) and digital signature (in bmp picture format) upon it.
Thanks
Devinder -
How to change background color of multilevel textbox in oracle form 6i
hi
How To Change background Color of the Text.
In One Multilevel Block 10 Record is Display At a Time in a Text Box (Name is AMTt)
This Text Box display , Buffer and Record Length is 10
In Case Of Amount is Less 500 then Text Color Is Red(Or Any) and In Case Amount Is More 500 Then Color is Green (Or Any).
Me Use This Code in PRE_RECORD EVENT
TCMTL is Block name
TCMTL_AMT is Text Box Name
if :TCMTL.TCMTL_AMT >5000 then
g_fun.msgbox('Values is more');
Set_Item_Property('TCMTL_AMT' , BACKGROUND_COLOR, 'r50g100b100');
else
g_fun.msgbox('Values is Less');
Set_Item_Property('TCMTL_AMT' , BACKGROUND_COLOR, 'r50g100b10');
end if;
but This Code Is Refer Only 10th Value and change color depend on value.
so
possible to Different color in One Block Text Box Then how?DECLARE
cur_itm VARCHAR2(80);
cur_block VARCHAR2(80) := Name_in('system.trigger_block') ;
BEGIN
cur_itm := Get_Block_Property( cur_block, FIRST_ITEM );
WHILE ( cur_itm IS NOT NULL ) LOOP
cur_itm := cur_block||'.'||cur_itm;
--:global.VISUAL_ATTRIBUTE:= 'BACKGROUND_COLOR';
--:global.VISUAL_ATTRIBUTE:= get_item_property(cur_block||'.'||cur_itm ,Background_Color);
IF :TCMTL.TCMTL_AMT >= 500 THEN
Set_Item_Instance_Property( cur_itm, CURRENT_RECORD, VISUAL_ATTRIBUTE,'r50g100b100');
ELSE
Set_Item_Instance_Property( cur_itm, CURRENT_RECORD, VISUAL_ATTRIBUTE,'r5g100b10');
END IF;
cur_itm := Get_Item_Property( cur_itm, NEXTITEM );
END LOOP;
next_record;
END;
this is my in that how to set a VISUAL_ATTRIBUTE, and where to set so get a background color of text and change -
How to change the Hyper links color in the XML form
HI SDNs
Do u have any idea how to change the hyperlink color in the xml form. My requirement is as follows.I have created xml form by using xml template and i displayed this xml form by using Km document iview. I need tochange the hyper link color in the xml form content. I dont want to go for manual process by editing the xml form. because i have several hundreds of xml forms.
Appreciate if you give suggestion.
Thanks
RamanaHi Ramana,
The most convenient way to change the hyper links is by using the Theme Editor. Go to System Administration --> Portal Display --> Select Theme --> Component-Specific Styles --> Links --> Function/Result Link.
Hope this helps.
Kind regards,
Joost -
How enabled Single Sign-On with a System SAP WAS ABAP (Run application BSP)
Hi.
I need to run any application BSP from a System SAP WAS ABAP, without entering SAP user and password. Using the windows authentication and without SAP Enterprise Portal.
What authentication methods I have to apply for enabled Single Sign-On with a System SAP WAS ABAP?.
And How can I enabled this method?.
Best regards.
Luis Gomez.Hi Ticiano,
SAP WebAS ABAP supports a number of authenticaiton mechanisms. See
[http://help.sap.com/saphelp_nw04s/helpdata/en/02/d4d53aa8a9324de10000000a114084/frameset.htm]
A number of these authentication mechanisms can be combined with Windows authentication (e.g. SNC, client certificates, ...).
The decision what mechanism fits best depends on critieria like
- SAP server platform
- security requirements
- extensibility (should same authentication mechanism be used for future SAP environments, which will be E-SOA based)
- authentication from outside company domain
- Use of SAP security library (SAPcryptolib)
You may want to look at the SAP Software Solution Partner Catalog, if you look for certified SSO solution vendors for SAP.
Best regards,
Peter -
How can i update regup-sgtxt field in sap script
Hi experts,
I have created sap script for payment print prog. In that one field is amount discription "REGUP-SGTXT". i want to use field "REGUP-SGTXT" as a discription. for sap script payment print i use T-Code f-43, fb03,f-58... now in whic T-code i fiiled the value of "REGUP-SGTXT"?? how can i update value in my sap script?? cause i ceateed so many doc no but "REGUP-SGTXT" its blank... so how can i fill this fiels???
Give me suggetion
ZenithiHi
Most of the times this text won't get populated
So better write an external PERFORM subroutine in the SCRIPT and fetch it from BSEG/BKPF tables using BELNR field and use in the cheque printing.
see the sample code for 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.
/: PERFORM
/: 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.
Example:
In script form
/: PERFORM READ_TEXTS IN PROGRAM 'Z08M1_FORM_EKFORM1'
/: USING &EKKO-EKORG&
/: USING &EKPO-WERKS&
/: USING &EKKO-EKGRP&
/: USING &EKKO-BSTYP&
/: CHANGING &COMPNAME&
/: CHANGING &SENDADR&
/: CHANGING &INVCADR&
/: CHANGING &COMPADR&
/: CHANGING &COVERLTR&
/: CHANGING &SHIPADR&
/: CHANGING &REMINDER&
/: CHANGING &REJECTION&
/: CHANGING &POSTADR&
/: CHANGING &LOGO&
/: ENDPERFORM
In program
FORM Read_texts - To extract the standard texts from the table *
FORM READ_TEXTS TABLES IN_PAR STRUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
DATA : L_EKORG TYPE EKORG,
L_WERKS TYPE WERKS_D,
L_BSTYP TYPE BSTYP,
L_EKGRP TYPE BKGRP.
READ TABLE IN_PAR WITH KEY 'EKKO-EKORG' .
CHECK SY-SUBRC = 0.
L_EKORG = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY 'EKPO-WERKS' .
CHECK SY-SUBRC = 0.
L_WERKS = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY 'EKKO-EKGRP' .
CHECK SY-SUBRC = 0.
L_EKGRP = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY 'EKKO-BSTYP' .
CHECK SY-SUBRC = 0.
L_BSTYP = IN_PAR-VALUE.
CLEAR Z08M1_ORG_TEXTS.
SELECT SINGLE * FROM Z08M1_ORG_TEXTS WHERE EKORG = L_EKORG
AND WERKS = L_WERKS
AND EKGRP = L_EKGRP
AND BSTYP = L_BSTYP.
IF SY-SUBRC NE 0.
SELECT SINGLE * FROM Z08M1_ORG_TEXTS WHERE EKORG = L_EKORG
AND WERKS = L_WERKS
AND EKGRP = L_EKGRP
AND BSTYP = SPACE.
ENDIF.
READ TABLE OUT_PAR WITH KEY 'COMPNAME'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_COMP.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'SENDADR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_ADRS.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'INVCADR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_INVC.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'COMPADR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_CPAD.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'COVERLTR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_COVR.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'SHIPADR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_SHIP.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'REMINDER'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_RMDR.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'REJECTION'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_RJCT.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'POSTADR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_POST.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'LOGO'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_LOGO.
MODIFY OUT_PAR INDEX SY-TABIX.
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&
Regards
Anji
Maybe you are looking for
-
What is the Diffrence between Oracle 11 and 11i
What is the Diffrence between Oracle 11 and Oracle11i ?. With Rgds Arun J.Isaac
-
Windows 8.1 desktop Freezes after boot for about 20 seconds
only the desktop freezes, it refuses to accept clicks on anything then all of the sudden it works fine. if I opened an application (like tmp.txt ) I get as many as I clicked on during the freeze period. the task bar works during this freeze period, j
-
Product type 56A/56B - How do we draw down principal amount?
Hi All I created a credit facility using product type 56A & transaction type 200. I have flow types 1204, 1205,1206 & 1207 associated to the facility. I created a total credit line of 25 million dollars in the profiles tab & created condition types
-
Enviroment: client Windows nt 4.0 Oracle EE 8.0.6 in hp-ux Oracle odbc driver 8.0.6.3 ASP we want to display a list of names...but it doesn't display an error message and the list is empty. Why? Thanks. code: ...<% dim conn dim rs Set con=Server.Crea
-
Hi! I have an iPod Touch 2nd Generation videos in iTunes won't copy?
Hello! I have an iPod Touch 2nd Generation, and I've been trying to put some videos on it, but whenever I try to sync it with my videos on iTunes, I get a message that says ''__' Was Not Copied to the iPod "__'s iPod because it cannot be played on th