How to convert the Ranges statment in ABAP program ?
Dear All,
I need to remove the ranges statements in my ABAP program. Becaz I found the Ranges statements are obsolete from SLIN results.
thanks,
Arunachalam S
Hi Arun,
Use SELECT-OPTIONS with the addition NO-DISPLAY , then you can use it same as RANGES.
Refer to the sample code.
REPORT zztest_select.
DATA : g_matnr TYPE mara-matnr.
*-- NO-DISPLAY makes SELECT-OPTION not to be dispalyed and
*-- you can use the SELECT-OPTION as RANGES
SELECT-OPTIONS : s_matnr FOR g_matnr NO-DISPLAY.
CLEAR : s_matnr,
s_matnr[]
s_matnr-sign = 'I'.
s_matnr-option = 'BT'.
s_matnr-low = 'MATERIAL10'.
s_matnr-high = 'MATERIAL99'.
APPEND s_matnr.
<b>AS</b>
Similar Messages
-
How to translate the key words in ABAp program from lower case to upper cas
How to translate the key words in ABAp program from lower case to upper case?
Hi Kittu,
You need to set the Pretty Printer settings to achieve key words in ABAP program from lower case to upper case.
Utilities -> Settings -> Pretty Printer (tab) -> Select third radio button.
Thats all.
<b>Reward points if this helps.
Manish</b> -
How to get the decision key in abap program
Hi guys.
I have a user decision workflow that have two options: Accept or Reject. This options has some type of id, right? Like '0001', '0002', right?
How i get this ids decisions through a abap program.
I need to know this because i have to pass this id to a Z Function Model.
Thanks!The result is found in the workitem container in the '_RESULT' or '_WI_RESULT' elements, you can use the SAP_WAPI_READ_CONTAINER function module to read the data (read the element from the simple container returned table).
CALL FUNCTION 'SAP_WAPI_READ_CONTAINER'
EXPORTING
workitem_id = im_wi_id
TABLES
simple_container = lt_container
READ TABLE lt_container WITH KEY element = '_WI_RESULT' into ls_container.
If you what to get the possible decisions description you can use the SAP_WAPI_DECISION_READ function module,
CALL FUNCTION 'SAP_WAPI_DECISION_READ'
EXPORTING
workitem_id = im_wi_id
TABLES
alternatives = lt_alts. -
How to create the condition record by ABAP program
Hi Friends,
I want to create/change the condition record of PR00 by ABAP program. It seems that there have no such BAPI/standard function can help on this. Can any one of you point out a way to me?? Thanks in addvance.
Joe GR.Joe,
Check with below FM..
BAPI_PRICES_CONDITIONS.
Check this link:
Re: Sample code for BAPI_PRICES_CONDITIONS
examples....
http://www.4ap.de/abap/bapi_prices_conditions.php
Two useful threads on Same topic
Re: Sample code for BAPI_PRICES_CONDITIONS
Re: Problem with BAPI_PRICES_CONDITIONS
BAPI_PRICES_CONDITIONS
Please check this sample code from other thread.
wtable1-table_no = '306'.
wtable1-applicatio = 'V'.
wtable1-cond_type = 'ZPR0'.
wtable1-operation = '009'.
wtable1-varkey = '13001001USD 000000000050068946'.
wtable1-valid_to = '99991231'.
wtable1-valid_from = '20051101'.
wtable1-cond_no = '$000000001'.
APPEND wtable1 TO table1.
wtable2-operation = '009'.
wtable2-cond_no = '$000000001'.
wtable2-created_by = sy-uname.
wtable2-creat_date = '20051022'.
wtable2-cond_usage = 'A'.
wtable2-table_no = '110'.
wtable2-applicatio = 'V'.
wtable2-cond_type = 'ZPR0'.
wtable2-varkey = '13001001USD 000000000050068946'.
wtable2-valid_from = '20051101'.
wtable2-valid_to = '99991231'.
APPEND wtable2 TO table2.
wtable3-operation = '009'.
wtable3-cond_no = '$000000001'.
wtable3-cond_count = '01'.
wtable3-applicatio = 'V'.
wtable3-cond_type = 'ZPR0'.
wtable3-scaletype = 'A'.
wtable3-scalebasin = 'C'.
wtable3-scale_qty = '1'.
wtable3-cond_p_unt = '1'.
wtable3-cond_unit = 'EA'.
wtable3-calctypcon = 'C'.
wtable3-cond_value = '454'.
wtable3-condcurr = 'USD'.
APPEND wtable3 TO table3.
CALL FUNCTION 'BAPI_PRICES_CONDITIONS'
EXPORTING
PI_initialmode = 'X'
PI_BLOCKNUMBER =
TABLES
ti_bapicondct = table1
ti_bapicondhd = table2
ti_bapicondit = table3
ti_bapicondqs = table4
ti_bapicondvs = table5
to_bapiret2 = table6
to_bapiknumhs = table7
to_mem_initial = table8
EXCEPTIONS
update_error = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
READ TABLE table6 WITH KEY type = 'E' TRANSPORTING NO FIELDS.
IF sy-subrc = 0.
loop at table6 into ret.
write: / ret-type, ret-message, ret-id, RET-LOG_NO, RET-LOG_MSG_NO,
RET-MESSAGE_V1, RET-MESSAGE_V2, RET-MESSAGE_V3, RET-MESSAGE_V4,
RET-PARAMETER,RET-ROW,RET-FIELD.
endloop.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
*EXPORTING
WAIT =
IMPORTING
return = ret
ENDIF.
Don't forget to reward if useful.... -
How to convert the report english to germany in abap
Hi guys,
How to convert the report english to germany in abap and any manual code or function module.
please give the solution.you need to maintain all the text in text element and maintain text translation..
goto> translations -
How to convert Oracle data types to ABAP types.
Hi,
I have this oracle table table:
Type of col.
Char(6)
Number
Number
Number
Number
Date
I dont know how to convert column of number to abap types. I use exec sgl syntax and I try to insert value to abap structure. But structure <dyn_wa> is wrong.
EXEC SQL PERFORMING loop_output.
SELECT *
INTO :<dyn_wa>
FROM BIND_VAT_CB_SUM_VIEW@DTRTST1
ENDEXEC.
ENDFORM. "get_data
ThanksHI,
REPORT demo_native_sql.
DATA: BEGIN OF wa,
connid TYPE spfli-connid,
cityfrom TYPE spfli-cityfrom,
cityto TYPE spfli-cityto,
END OF wa.
DATA c1 TYPE spfli-carrid VALUE 'LH'.
EXEC SQL PERFORMING loop_output.
SELECT connid, cityfrom, cityto
INTO :wa
FROM spfli
WHERE carrid = :c1
ENDEXEC.
FORM loop_output.
WRITE: / wa-connid, wa-cityfrom, wa-cityto.
ENDFORM.
See the below SAP link for more info
http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3b8b358411d1829f0000e829fbfe/content.htm
Thanks
Sudheer -
How to Convert the Warning Message to Error Message in Standard Transaction
Hi,
I face one problem in Standard Transaction Code CS02. In that by entering the material Number, Plant, bomstatus press enter. it gives a warning message. How to convert the Warning message to Error. In abap how to do that. Please help me.Mohan,
It appears that there is some configuration you can do for BOM Message types to change the message type. The IMG link for this function is:
Production->Basic Data->Bill of Material->General Data->Change Message Type
However you need to read the IMG documentation to see if this will work for you. There are only certain messages that can be changed with this configuration step.
Also, please do not double post questions in the forums.
Best Regards,
Chris H. -
How to convert the javasource file(*.class) to execute file(*.exe)?
thank you!Although i have seen a few programs (that are platform specific) that will embed a small jvm into an exe with your class file, it is generally excepted that you cannot create an executable file using java. The JAR executable file is probably the closest your going to get
Pete -
I have a MacBook Pro, I want to copy Itunes files to an SD card to play in my car, the SD Card doesn't appear in Itunes when I insert it, and I don't know how to convert the files to the correct format, can anyone help?
Thank youSo it seems from reading the COMMAND manual that my first issue is that I used a 16GB SD card, and the manual says it will only recogize up to a 2GB SD card. I did use my MB Air's SD card slot and crated a folder and dragged the music files to it, then to the card. So I am going to get a 2GB card and try that next. Otherwise just stick with the iPOD connected. At least that is 8GB
-
How to change the range in numbers?
how to change the range on graph from .0000 to .0 or .00 and ther range on thr graph from 2's to .5
Hi,
Click on Graph Properties icon->Scale Tab -> Click on Vertical axis and specify your range.
Regards,
Dpka -
hi i would like to know how to extend the range of my time capsule wifi network(500G 802.11n) using an airport express. i have a double storey home and would like to extend range to my upstairs bedrooms.i have a time capsules network setup via a netgear adsl.i have a second imac upstairs which connects to time capsule wifi network (it is within range as it is directly abobe on 1st floor)
could you tell me how best to set airport express up to extend my wifi range?Greetings,
This is called an "Extended wireless network".
Read this article for details and steps on how to extend your TimeCapsule's network:
http://support.apple.com/kb/HT4259
Cheers. -
How to convert the character value to currency/numeric
Hi,
See the sample code here
data: v_qtr_field(7).
data: w_low_limit like glt0-kslvt,
w_amount like glt0-hslvt.
w_low_limit = 02.
w_max_period = 3.
concatenate 'HSL' w_low_limit into v_qtr_field.
*comment
*I am looking for a field formation thru above code like in GLT0 table like HSL02,HSL03 *etc based on the value user entered in the selection *screen
DO w_max_period TIMES
VARYING w_amount FROM v_qtr_field NEXT v_qtr_field + 1.
t_trans_values-dmbe2 = t_trans_values-dmbe2 + w_amount.
ENDDO.
I am facing problem in the Do loop as it wont allows multiple data types. can you suggest me how to convert the v_qtr_field whose data type is character to currency?Hi,
Please check this code .
PERFORM write_currency
USING buf_anla-urwrt t_dates-waers t_txw_anla-urwrt.
* FORM WRITE_CURRENCY *
* convert currency amount to string *
* - use decimal point *
* - remove separator characters *
* --> P_AMOUNT *
* --> P_CURRENCY_UNIT *
* --> P_STRING *
FORM WRITE_CURRENCY
USING P_AMOUNT TYPE P
P_CURRENCY_UNIT LIKE TCURC-WAERS
P_STRING TYPE C.
DATA: DEC2POINT(2) TYPE C VALUE ',.'.
* convert separator to decimal point
WRITE P_AMOUNT TO P_STRING CURRENCY P_CURRENCY_UNIT
NO-GROUPING
NO-SIGN
LEFT-JUSTIFIED.
TRANSLATE P_STRING USING DEC2POINT.
* put minus sign before number
IF p_amount < 0.
SHIFT P_STRING RIGHT.
P_STRING(1) = '-'.
ENDIF.
ENDFORM.
<i>Hope This Info Helps YOU.</i>
Regards,
Lakshmi -
How to convert the Report Builder output to .xls
Dear All,
Let me please know how to convert the Report Builder output to Excel Format.
As there are having the facility to convert the output in .PDF or .HTML format but i want to convert that into Excel Sheet......
Please Guide me in this regards
Thanks in advance
Regards,
Vishal......Hello,
If your question is about the format spreadsheet, it is not possible from Reports Builder :
http://www.oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwwhthow/whatare/output/output_a_simpleexcel.htm
Restrictions
It is not possible to generate spreadsheet output directly from Reports Builder. Instead, on the command line, you can run the report using rwrun or Reports Server clients (rwservlet, rwclient, rwcgi), with DESFORMAT=SPREADSHEET. You cannot store DESFORMAT=SPREADSHEET as a system parameter value in the report definition (.rdf file).
Regards -
How to debug the background job in ABAP
Hi Guys,
Can anyone let me know how to debug the background job in ABAP.
Thanks in advance
peterHi,
Goto SM37 and see the log if any is there and based on that you can check the code.
you can't debug background job.
Create a Variant for the Program and
Schedule JOB in background:
Go to SM36 create a Job
enter Program and Variant for that program in STEP..
click on Start Condition
Click on DATE and TIME enter date scheduled Start and END times
click on Period Values
Click on HOURLY/WEEKLY etc
CLick on RESTRICTIONS also to use further criteria.
so your job will be scheduled and run as per your requirement.
and in SM37 Transaction check the status of that JOB
Check this link for scheduling jobs..
http://help.sap.com/saphelp_nw2004s/helpdata/en/c4/3a7f87505211d189550000e829fbbd/content.htm
Check this
http://jplamontre.free.fr/SAP/Debug%20background%20process.htm
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/abap+debugger&
Regards,
Padmam. -
How to save the data to sap abap using Adobe Flex
Hi Everybody......
I am new to Adobe flex with sap abap.
How to save the data in sap abap using Adobe Flex coding is Action Script and using RFC web service.
Please give me any suggisions on that.
Thank you
Venkatesh VHi Venkatesh,
Try with folowing coding...
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
initialize="initApp()">
<mx:Label x="10" y="23" text="Airline" width="90" id="lblAirline"/>
<mx:TextInput x="108" y="21" id="txtAirline"/>
<mx:Button x="10" y="49" label="Get Data" id="btnGetData" enabled="false" click="getData()"/>
<mx:DataGrid x="10" y="97" id="dgFlightData" dataProvider="">
</mx:DataGrid>
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.AbstractOperation;
import mx.rpc.events.FaultEvent;
import mx.rpc.soap.LoadEvent;
import mx.rpc.events.ResultEvent;
import mx.rpc.soap.WebService;
[Bindable] public var flightData:ArrayCollection;
private var flightWS:WebService;
private function initApp():void{
flightWS = new WebService();
flightWS.wsdl = "http://uscib20.wdf.sap.corp:50021/sap/bc/soap/wsdl11?services=ZGTEST&sap-client=000";
flightWS.addEventListener(FaultEvent.FAULT,onWSError);
flightWS.addEventListener(LoadEvent.LOAD,onWSDLLoaded);
flightWS.addEventListener(ResultEvent.RESULT,onFlightWSGotResult);
flightWS.loadWSDL();
private function getData():void{
var operation:AbstractOperation = flightWS.getOperation("ZGTEST");
var input:Object = new Object();
input.Airline = txtAirline.text.toUpperCase();
operation.arguments = input;
operation.send();
private function onWSError (event:FaultEvent):void{
private function onWSDLLoaded(event:LoadEvent):void{
btnGetData.enabled = true;
private function onFlightWSGotResult(event:ResultEvent):void{
flightData = event.result.SFLIGHT;
]]>
</mx:Script>
</mx:Application>
Regards,
Vinoth
Maybe you are looking for
-
Read Only Display Settings Help
Hello, I am trying to control what some users can see in a page. Right now I have an item field (Roles) display as checkbox. Roles is a field in my table that I created with RolesA, RolesB, RolesC. Note: these are not htmldb roles. In my Edit Page It
-
Captivate 4, interaction SWF using XML and the Reviewer tool Problem
Hello everyone! I am an advanced AS3er and am only months old working with Captivate 4. I've found some cool ways to use Captivate and incorporating swfs that use CSS and XML for their dynamic content builder and interactivity as well. However, I've
-
Hi, our JDBC Adapter is stopping polling automatically. It seems if the adapter does not process an event for a long time. The adapter is stopping polling. Can somebody help me?
-
BAPI object - FATAL ERROR.
Receiving xMII Workbench errors due to possible BAPI coding discrepancies in BAPI object CSEP_MAT_BOM_READ. Am getting a FATAL ERROR RADIO BUTTON in xMII work bench with Jco connector to R3 systems. However the same BAPI Object CSEP_MAT_BOM_READ pass
-
Hi Experts, This is siri,I am ABAP Fresher. Please can any one provide me the information regarding OOABAP. 1) What is OO ABAP.? 2) How to start it from starting? 3) Where to find all predeifined methods and classes? 4) How to use exactly thos