Negative sign mapping handling for amount field
hi Experts,
From SAP ecc to PI we are receiving - negative sign after the amount value 1000 - . can you please suggest the suitable graphical mapping or UDF whenever amount value in -ve should give the ouput result as -1000. .
Regards,
Krushi.
Hi Krushi - I don't see any complexity in it..
Use graphical function "endswith" to check if the amount has "-"
If yes then use replace function to replace "-" and then again conact it with "-"
amount then amount->replacevlaue "-"-> concat + "-",amount
endswith if
- else amount
For graphical function look at the below blog-
Standard Functions in PI 7.0 - Process Integration - SCN Wiki
Similar Messages
-
Insert asterisk(*) for amount field (Very Urgent)
Hi all,
I want to insert asterisk() for amount field REGUD-SWNET(15C) in SAP script. ie suppose amount is 1000.00 rest of the length should be filled by asterisk() infrount of amount. ie ********1000.00 it has display like this.
Your help ll be rewarded.
Regards
Yathishhi,
We can replace leading spaces in a value with a FILL CHARACTER.
SYNTAX: <b> &symbol(Ff)&</b> here f is fill character.
example: ®UD-SWNET& value is 700.00
®UD-SWNET(F*)& value printed as ******700.00.
regards,
sudheer. -
Changing SIgn for Amount field
Hi:
We have a requirement where we need to change +/- sign on amount field in Infocube during the data loading. How this can be done?
ThanksHi Sunil,
In the update rules, in the key figure you want, instead of assigning a source key figure from communication structure (first option), select the formula and press create. Name your formula, and then, in the formula editor, double click your key figure so it appears in the upper part. Then press the * button. and finally press constant button and enter -1 in the text box it appears. This should do it.
Hope it helps.
Regards,
Diego Lombardini -
Mapping problem for date field
Hi XI Friends..
In my file to idoc scenario..
i have field date value :2006-10-10T14:10:10
i have convert the above field into two fields idate :20061010
itime:141010
i used substring datetransfer functions..
but in static test of message mapping ..i am getting value for itime as 021010
if we give before 12:00:00 its converting properly..after 12.:00:00 its taking 12hr format only..
please guide me..
regards
ramHi Ram,
Is this still a problem?
I think the hint will also work in this case:
sourcefield --> replaceString(sourceField/constant[T]/constant[]) --> TransformDate(yyyy-mm-ddHH:MM:SS --> HH:MM:SS) --> targetFieldTime
sourcefield --> replaceString(sourceField/constant[T]/constant[]) --> TransformDate(yyyy-mm-ddHH:MM:SS --> YYYYMMDD) --> targetFieldDATE
Daniel -
Mapping isssue for two fields must be checked and passed to target field
Hi all
I am using IDOCS, ORDERS05, in which i have shipment country in header level and Item level,
so in my mapping i must check if i shipment exist in item level , if it exists it should pass to target field, and if doesnot exist it should pass the header level data , is it possiable in graphical mapping , please help me
thanking you
Sridhar>
sridhar loganathan wrote:
> Hi all
> I am using IDOCS, ORDERS05, in which i have shipment country in header level and Item level,
> so in my mapping i must check if i shipment exist in item level , if it exists it should pass to target field, and if doesnot exist it should pass the header level data , is it possiable in graphical mapping , please help me
> thanking you
> Sridhar
yes.
lets call the item level shipment as itemshipment and the header level as headershipment.
the logic will be;
itemshipment
|
itemshipment --- *exist* *if -- then* - TargetField
|
*else* - headershipment -
Validation for Amount fields..very urgent
hI ALL.
I want Validation like Right justify amount decimal point and 2 decimal places.
this is Work area
TYPES: BEGIN OF T_DATATAB,
COL01(60) TYPE C,
COL02(60) TYPE C,
COL03(60) TYPE C,
end of T_datatab.
data: g_t_dbt like table of dbt initial size 10,
wa_dbt type dbt.
DATA : VAL TYPE STRING.
Now i want move value from VAL to wa_DBT-CURRENCY as follows,
move wa_datatab-col07 to wa_DBT-CURRENCY.
MOVE VAL TO wa_DBT-CURRENCY.
so if i give input 100, i need display like 100.00
Help me
helpful answers will be get rewarded.it is very urgent
Regards.
Bhanu
Message was edited by:
bhanuHi bhanu,
1. simple
2. just use
WRITE numberfield to charfield.
(it will put the field
in the SAME FORMAT as DISPLAY FORMAT)
eg. YYYYMMDD will put as dd.mm.yyyyy
256 will put as 256.00
regards,
amit m. -
How to delete leading zeros for amount fields
Hi all,
I have problem with the leading zeros, where I am populating nearly 30 amount fileds in my statement.i want to delete leading zeros.
I have tried with shift and pack.
and I cannot call every time the function module *alpha_output or input.
can anybody suggest me the better solution.
Regards,
SreYou could use a syntax like
SHIFT: w10a LEFT DELETING LEADING '0',
w10b LEFT DELETING LEADING '0',
w10c LEFT DELETING LEADING '0',
w10d LEFT DELETING LEADING '0'.
or using macros like
DEFINE delzero.
shift &1 left deleting leading '0'.
END-OF-DEFINITION.
delzero: w10a, w10b, w10c, w10d.
Regards -
To prefix an amount with a negative sign
Hi All,
I want to prefix a positive amount with a negative sign...for display...
How will I be able to do that ?
Regards,
Archanaamount = -1 * amount.
if it does not work then you might need to change the type of amount field.
Thanks,
Ram -
How to hide the negative sign while displayed in ALV
Hi,
I am having a field for 'Price' for which i need the negative sign to do the sum (i.e. futher calculation) but i dont want to display the negative sign which is with 'Price' field in the output screen.
I tried with the attribute no_sign = 'X' in the field catalogue,but still the negative sign was getting displayed in the output.
Please help me to not to display the sign in the output.
Thanks in Advanced.
Regards,
DarshanaHi Darshana,
Before displaying the ALV , check what is the value of that particulat field (in a loop ) and if it is less than 0 , make it positive.
CALACULATION part
LOOP AT itab into wa.
IF wa-val1 < 0 .
wa-val1 = wa-val1 * -1 .
MODIFY itab from wa INDEX sy-tabix .
ENDIF.
ENDLOOP.
Then build the field catalogue and finally display the ALV .
Thanks -
Export all maps (mappings for all dimensions in EXCEL)
Hi,
it shouldn't be an unknown issue - but unfortunately I can't find the way :-(Below is updated code with the following changes :
- Adjusted SaveAs logic to prevent Excel prompts in the event the file already exists, etc. (i.e. DisplayAlerts TRUE / FALSE)
- Added Range creation logic for each worksheet page. If I really wanted perfect code, could do this better, but it gets the job done.
Sub ExportAllCurrDimMapsForLocationtoXLS()
'UpStream WebLink DM Custom Script:
'Created By: cbeyer
'Date Created: 11-23-11
'Purpose: Export all dimension maps to an Excel workbook
'Declare Constant
'NOTE : This will control whether the function gets the current map in the system or whether it looks back for a specific Period
' FDM stores the Map for each period that was loaded... You may want to export a particular POV Period for audit purposes, etc.
' IF you enable this, be sure to set the POV Period before running.....
Const boolgetPOVPeriodMap = False
'Declare working variables
Dim intPartitionKey
Dim strOutputMessage
Dim strSQL
Dim strCategoryFreq
Dim objPeriodKey
Dim strOutputFileName
Dim strOutputFilePath
'Get the location (PartitionKey
intPartitionKey = RES.PlngLocKey
'Create SQL Query to get Current Map Data
If boolgetPOVPeriodMap = False Then
strSQL = "SELECT * FROM tDataMap where PartitionKey = " & intPartitionKey & " order by DimName ASC"
Else
strCategoryFreq = API.POVMgr.fCategoryFreq(API.POVMgr.PPOVCategory)
Set objPeriodKey = API.POVMgr.fPeriodKey(API.POVMgr.PPOVPeriod, 0, strCategoryFreq)
strSQL = "SELECT * from vDataMap where PartitionKey = " & intPartitionKey & " and PeriodKey = '" & objPeriodKey.dteDateKey & " 12:00:00 AM' order by DimName Asc"
End If
'Create Recordset for all Exported Entities
Set rsMap = DW.DataAccess.farsKeySet(strSQL)
If rsMap.EOF And rsMap.BOF Then
'No records
If boolgetPOVPeriodMap = False Then
strOutputMessage = "No Mapping data was found For " & API.POVMgr.PPOVLocation & ". If this location Is using Parent Maps, you can only export mapping data at the parent location."
Else
strOutputMessage = "No Mapping data was found For " & API.POVMgr.PPOVLocation & " for period " & API.POVMgr.PPOVPeriod & ". If this location Is using Parent Maps, you can only export mapping data at the parent location."
End If
Else
'Records Exist, process
'Generate file name / path
If boolgetPOVPeriodMap = False Then
strOutputFileName = API.POVMgr.PPOVLocation & "_DimensionMaps.xls"
Else
strOutputFileName = API.POVMgr.PPOVLocation & "_" & objPeriodKey.strDateKey & "_DimensionMaps.xls"
End If
strOutputFilePath = DW.Connection.PstrDirOutbox & "\ExcelFiles\"
'Create Excel file reference
'Declare Excel working variables
Dim oExcel
Dim oBook
Dim oSheet 'No puns here......
Dim oRange
Dim intCurrentSheetOrdinal
Dim intCurrentRowOrdinal
Dim intCurrentColOrdinal
'Intialize Excel
Set oExcel = CreateObject("Excel.Application")
Set oBook = oExcel.Workbooks.Add
'Declare working variables
Dim strCurrDimName
'Initialize variables
strCurrDimName = ""
intCurrentSheetOrdinal = 1
intCurrentRowOrdinal = 1
intCurrentColOrdinal = 1
With rsMap
Do Until .eof
'Check to see if current DimName matches existing DimName. If not, add headers
If rsMap.fields("DimName") <> strCurrDimName Then
'If the dimension name has changed to a different dimension name, show total information before starting headers
'If the previous dimension was not "", then we are transitioning from one range to the next. Lets create a named range on the just
'finished worksheet because we can or because you may want to use this for re-uploading
'NOTE : The range I'm creating is more for reference as to how to implement this and I don't know if I'm making the range in a fashion that
'FDM will pickup for importing.
'NOTE : You probably want intCurrentRowOrdinal - 1 since it is 1 row past the last row of data at this point. If you want to clean it up,
'then you need to make sure RowOrdinal is not going to be less than the starting point and I didn't feel like adding the couple rows of
'code to do the work properly as FDM will just ignore the blank row in all likelihood.
If strCurrDimName <> "" Then
Set oRange = oSheet.Range("A6:K" & intCurrentRowOrdinal)
oBook.Names.Add "ups"&strCurrDimName, oRange
End If
'Create worksheet reference
Set oSheet = oBook.Worksheets(intCurrentSheetOrdinal)
'Create default header at top of each new dimension group
If boolgetPOVPeriodMap = False Then
oSheet.range("A1") = (API.POVMgr.PPOVLocation & " - Map Conversion")
Else
oSheet.range("A1") = (API.POVMgr.PPOVLocation & " - Map Conversion for " & rsMap.fields("PeriodKey"))
End If
oSheet.range("A3") = "Partition: " & API.POVMgr.PPOVLocation
oSheet.range("A4") = "User ID: " & DW.Connection.PstrUserID
'NOTE: I could make an array of the field names and do a loop here; however, this is easier to read.....
' probably not how I would do it from an efficiency standpoint, but since it's a limited number of fields
' this will work.....
oSheet.range("A5") = "PartitionKey"
oSheet.range("B5") = "DimName"
oSheet.range("C5") = "Source FM Account"
oSheet.range("D5") = "Description"
oSheet.range("E5") = "Target FM Account"
oSheet.range("F5") = "WhereClauseType"
oSheet.range("G5") = "WhereClauseValue"
oSheet.range("H5") = "-"
oSheet.range("I5") = "Sequence"
oSheet.range("J5") = "DataKey"
oSheet.range("K5") = "VBScript"
'Update variables
strCurrDimName = rsMap.fields("DimName")
intCurrentRowOrdinal = 6
intCurrentSheetOrdinal = intCurrentSheetOrdinal + 1
'Update worksheet name
oSheet.name = strCurrDimName
End If
'Write Details
oSheet.range("A" & intCurrentRowOrdinal) = intPartitionKey
oSheet.range("B" & intCurrentRowOrdinal) = rsMap.fields("DimName").Value
oSheet.range("C" & intCurrentRowOrdinal) = rsMap.fields("SrcKey").Value
oSheet.range("D" & intCurrentRowOrdinal) = rsMap.fields("SrcDesc").Value
oSheet.range("E" & intCurrentRowOrdinal) = rsMap.fields("TargKey").Value
oSheet.range("F" & intCurrentRowOrdinal) = rsMap.fields("WhereClauseType").Value
oSheet.range("G" & intCurrentRowOrdinal) = rsMap.fields("WhereClauseValue").Value
oSheet.range("H" & intCurrentRowOrdinal) = rsMap.fields("ChangeSign").Value
oSheet.range("I" & intCurrentRowOrdinal) = rsMap.fields("Sequence").Value
oSheet.range("J" & intCurrentRowOrdinal) = rsMap.fields("DataKey").Value
oSheet.range("K" & intCurrentRowOrdinal) = rsMap.fields("VBScript").Value
'Increment Counters
intCurrentRowOrdinal = intCurrentRowOrdinal + 1
'Move to the next record
.movenext
Loop
End With
'Final Sheet Named Range addition
'Since the loop will end and we will not execute the above logic to create the range for the previous sheet
'the easiest (laziest) solution is to just handle the last sheet after the loop.
'We're basically doing the same stuff we did above, just down here.
If strCurrDimName <> "" Then
Set oRange = oSheet.Range("A6:K" & intCurrentRowOrdinal)
oBook.Names.Add "ups"&strCurrDimName, oRange
End If
'Close / release file objects
'Added some logic here to ensure you don't get caught up on the file replace prompt.
oExcel.Application.DisplayAlerts = False
oBook.SaveAs strOutputFilePath & strOutputFileName
oExcel.Application.DisplayAlerts = True
oExcel.Quit
'Create output message
strOutputMessage = "Mapping data export for " & API.POVMgr.PPOVLocation & " complete. Extract file is : " & strOutputFilePath & strOutputFileName
End If
'Close / release data objects
rsMap.close
'Display output
If LCase(API.DataWindow.Connection.PstrClientType) = "workbench" Then
MsgBox strOutputMessage
Else
'Let the user know we are done
RES.PlngActionType = 2
RES.PstrActionValue = strOutputMessage
End If
End SubEdited by: beyerch2 on Dec 14, 2011 9:43 AM -
Custom module pool + Amount field decimals display same as standard screen display
Hi All,
Requirement: A custom module program screen field has to be designed which displays decimal values of amount fields same as amount fields in standard screen.
Standard screen behavior: If the standard screen fields are observed, they refer to data elements WRBTR or AZSOL_F05A (transactions FB50/FB03/FB01). However, number of decimal places that are visible on screen are dependent on the currency that is provided.
Both the data elements have 2 decimal places.
For currency USD two decimal places are displayed - in TCURX - decimal places are two.
For currency JPY or CLP - zero decimal places are displayed - in TCURX - decimal places are zero.
i.e., even though the screen field refers to data element or domain that has the characteristic to show 2 decimal places, based on currency, decimal places are adjusted.
I would like to know how this is happening on standard screen fields.
Solution Required for: How to make the custom screen amounts to display same number of decimal places as standard screen amount fields.
P.S: Before posting the query here, research has been done in SDN and other places. It has been identified that quantity fields adjustments are discussed. However for amount field even though discussed earlier, did not reach a conclusion.
I would like to get a solution for this one.
Thanks in advance.
Goutham.Thank you all for taking time to take a look at this query.
This issue has been resolved.
Resolution: If the standard transactions (FI transactions in specific) are observed, whenever there is a field that displays amount value, there will be a corresponding field (may not be beside the amount field, somewhere on the screen or in the same sequence of screens) where the currency key value would be entered.
For instance, if you look at FB50 - there is field on top for the user to input currency key value (like USD or CLP or INR).
When any amount field is declared - this currency key field is provided as the reference field in the screen attributes of the amount field.
In short, in the custom module pool program, provide a field that holds currency key value and use this field as reference field for the amount fields.
Do repond to this thread if the resolution is not clear.
Thank you all once again.
Goutham. -
Weird character 'u00A4' display at output of ADOBE form in SAP for amount
When display pattern for amount field is set for ADOBE form in SAP, output displays ' ¤ '.
All display patterns shows '$' at the begining, but when output is generated it displays '¤'.
Advice me how to eliminate this. (or)
Is there a way to hide this character.I am not saying this is your problem BUT I was troubled for quite a while by having unprintable characters imbedded within text fields. It turns out that Ctrl V character was being embedded within text by user.
So I suggest that you view the data while in debug and do it in hex. This was the only way I was able to see that I had a problem with the text itself. Then I was able to add logic to filter for these errors. -
Hi,
In source file for amount fields there are some invalid text. As the amount fields refers to currency. How to delete the invalid text in amount fields. Example- Amount field is having "qwerr" text and the currency referencing unit is INR. Instead Amount field should contain some amount value like 7000 which refers to referencing unit INR. How to delete the invalid text which is coming in the source file.
Best Regards,
SDN UserHi,
this forum is for the SAP BusinessObjects BI Solution Architecture. I would suggest you post your question into the SAP BW forum.
regards
Ingo Hilgefort -
Negetive signe prob for a amount field
i m selecting data from DBtable into my internal table there i have a field type packed length 15 in the table i have negetive amount like (152523 -) . i want to place the negetive sign from the suffix to the prefixx.
means (- 152523) i can do this but i want to know the best possible way to do this without modifying the DBtable fields .
waiting for your reply
Message was edited by:
pawan kumar jhaI also had a similar problem. My problem was for currency field and I had to display it with negative sign in front as well as I need to use the same for subtotals. What I did was: I had declared that field in internal table as character and then that negative sign will be in front. I had used ALV method to display the same. Then while adding that column in the fieldcatalogue I have metioned fieldcat-datatype = curr, then it worked for me.
You can also try it in same way by decalring that field as character in your internal table.
I hope it helps.
Best Regards,
Vibha
*Please mark all the helpful answers -
Populate negative sign to amount fields
Dear SDNers,
i need to populate a amout in local currency and amount in document currency fields with negative sign based upon debit./redit indicator. that is if debit/credit indicator gives s means we need to populate neagtive sign to for those fields, if it gives H nothing has to be populate.
this is possible in update rules. plesae provide the code or else posible in bex.
fields
/BI0/OIOI_DMBTR-----amount in local currency
/BIC/OIZWRBTR----amount in document currency
/BI0/OIFI_DBCRIND---- Debit/Credit Indicator
need the code for in update rules.
help me on thatHi ,
i am getting the following the error while checking the update routine
E:Field "COMM_STRUCTURE-OIFI_DBCRIND" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement. "DATA"statement.
PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line -
TABLES: ...
DATA: ...
$$ end of global - insert your declaration only before this line -
The follow definition is new in the BW3.x
TYPES:
BEGIN OF DATA_PACKAGE_STRUCTURE.
INCLUDE STRUCTURE /BIC/CSZADPAY.
TYPES:
RECNO LIKE sy-tabix,
END OF DATA_PACKAGE_STRUCTURE.
DATA:
DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
WITH HEADER LINE
WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
FORM startup
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n
DATA_PACKAGE STRUCTURE DATA_PACKAGE
USING RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
$$ begin of routine - insert your code only below this line -
fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
to make monitor entries
IF COMM_STRUCTURE-OIFI_DBCRIND = 's' .
RESULT = COMM_STRUCTURE-OIOI_DMBTR * -1.
ELSEIF COMM_STRUCTURE-OIFI_DBCRIND = 'h' .
RESULT = COMM_STRUCTURE-OIOI_DMBTR.
ENDIF.
if abort is not equal zero, the update process will be canceled
ABORT = 0.
$$ end of routine - insert your code only before this line -
ENDFORM.
Maybe you are looking for
-
FUNCTION MODULE RSDRC_INFOPROV_READ, HOW TO USE IT
HI ALL, i have to use this function module RSDRC_INFOPROV_READ to access data from a remote cube, can anybody tell me how to use this function module properly. i am using a remote cube ARC_DP which is developed by our BIW guys, i am passi
-
What is the 'Use of SAP implimentation particularly in SD'?
Hi SAP experts, I would appriciate if any one can clearify the basic question of 'Use of SAP implimentation particularly in SD. Though it seems a simple question, but contains a very good information. <b><REMOVED BY MODERATOR></b>. Thanks inadvance N
-
How do i get my audio book i purchased
how do i get my audio book i purchased on my ipad from itunes
-
Folders in Library??!
As you can tell I am brand new to Itunes, I have a very extensive collection of cds that I want to dump into the itunes library. Is there a way to create folders in the Library section so I don't just have a list of 1000s of songs? Any help would be
-
Cannot download JDev 10g (10.1.3) - Developer Preview
I go through all the pages : login / privacy / yara...yara...yara and on: http://www.oracle.com/technology/software/products/jdev/htdocs/soft1013java.html I try to click on http://download.oracle.com/otn/java/jdeveloper/1013/jdevjavabase1013.zip but