Mapping problem:filling field with 0 (zeros) in material number
I want to create a mapping like the ABAP function:
CONVERSION_EXIT_MATN1_INPUT
for example:
1 => 000000000000000001(add zeros if input value is
numeric)
Z => Z(no change if input is not numeric)
The standard function "formatnum" works well from 1 => 000000000000000001.But it causes a java exception from Z => Z.
How to solve it?
Must i develop a UDF?
thanks
if i understood your requirement, you need to do padding(left) for your input. In that case use this UDF to help you out;
int len = 10 ; // the maximum length of the field in your target.
StringBuffer sBuf= new StringBuffer(a);
while (sBuf.length() < len) {
sBuf.insert(0,'0');
return(sBuf.toString());
Message was edited by:
Shabarish Vijayakumar
Similar Messages
-
How to Map Proces form field with Resource form field?
Hi,
How to Map Proces form field with Resource form field while creating Process form in Form designerAre you talking about Provisioning ?
then you do that in Data Flow under Process Defintion in OIM 10g
In OIM 11g you use Request Dataset. In that you can directly map fields to process form. -
Mapping the CMP Fields with the Database Table using Websphere???
Hi,
How to Map the CMP Fields with the Database Table using Websphere
thru ejb.jar.xml???
Thanks,
JavaCrazyLoverHi,
How to Map the CMP Fields with the Database Table using Websphere
thru ejb.jar.xml???
Thanks,
JavaCrazyLover -
Hiding fields with zeros or blanks in ALV using factory classes
Hi all,
I am using Factory Method for displaying ALV.
And I want to hide all the fields with Zeros or Blanks.
Any help wud be rewarded.
Thanks
PreetiHi,
Below is the code used to hide a particular field ,here it is MANDT.This code is put after the factory method.
data: lr_columns type ref to cl_salv_columns.
lr_columns = gr_table->get_columns( ).
lr_columns->set_optimize( abap_true ).
data: lr_column type ref to cl_salv_column.
try.
lr_column = lr_columns->get_column( 'MANDT' ).
lr_column->set_technical( if_salv_c_bool_sap=>true ).
catch cx_salv_not_found.
endtry.
Thanks. -
Appending leading zeros to material number
Hi,
I want to form a object key for material number. so i need to append leading zeros to material number. but i am getting "TYPE CONFLICT" shot dump in FM 'BAPI_OBJCL_GETDETAIL'.
The following code is giving the dump.
data: wa_object(18) type c.
wa_object = '100301010'. "Material No
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = wa_object
IMPORTING
OUTPUT = wa_object.
CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'
EXPORTING
OBJECTKEY = wa_object
OBJECTTABLE = 'MARA'
CLASSNUM = 'FINISHED_MATERIAL'
CLASSTYPE = '001'
KEYDATE = SY-DATUM
UNVALUATED_CHARS = ' '
LANGUAGE = SY-LANGU
TABLES
ALLOCVALUESNUM = IT_ALLOCVALUESNUM
ALLOCVALUESCHAR = IT_ALLOCVALUESCHAR
ALLOCVALUESCURR = IT_ALLOCVALUESCURR
RETURN = IT_RETURN
but if I hard code to 18 characters, the following code is working fine:
CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'
EXPORTING
OBJECTKEY = '0000000000100301010'
OBJECTTABLE = 'MARA'
CLASSNUM = 'FINISHED_MATERIAL'
CLASSTYPE = '001'
KEYDATE = SY-DATUM
UNVALUATED_CHARS = ' '
LANGUAGE = SY-LANGU
TABLES
ALLOCVALUESNUM = IT_ALLOCVALUESNUM
ALLOCVALUESCHAR = IT_ALLOCVALUESCHAR
ALLOCVALUESCURR = IT_ALLOCVALUESCURR
RETURN = IT_RETURN
Please tell me how to rectify the short dump which uses Conversion_exit_alpha_input.
Thanks .
SankarHi Shankar,
When ever u pass parameters to any function module the type of parameters must match with the ones defined in function module. Here u defined ur object key like this
data: wa_object(18) type c.(18 digits). But the in function module it referenced with BAPI1003_KEY-OBJECT (50 digits). So u have to define the variable with BAPI1003_KEY-OBJECT.
Check this solution. It will work for u.
data: wa_object(18) type c,
wa_object1 TYPE BAPI1003_KEY-OBJECT.
wa_object = '100301010'. "Material No
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = wa_object
IMPORTING
OUTPUT = wa_object.
wa_object1 = wa_object.
CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'
EXPORTING
OBJECTKEY = wa_object1
OBJECTTABLE = 'MARA'
CLASSNUM = 'FINISHED_MATERIAL'
CLASSTYPE = '001'
KEYDATE = SY-DATUM
UNVALUATED_CHARS = ' '
LANGUAGE = SY-LANGU
TABLES
ALLOCVALUESNUM = IT_ALLOCVALUESNUM
ALLOCVALUESCHAR = IT_ALLOCVALUESCHAR
ALLOCVALUESCURR = IT_ALLOCVALUESCURR
RETURN = IT_RETURN
Thanks,
Vinod. -
How to remove leading zero from Material Number
Hello Everyone,
I need to figure it out how to remove leading zero from material number. Cureently extractor is sending material number as 100663. But when comes into BI i am getting as "000000000000100663" and similariy in report it is appearing as "000000000000100663". Now my client wants me to exclude preceeding zero for a material in all the reports.
Is there any setting in query desinger to handle this issure or in the backend.
Need your inputs.
Thanks,
Lasya.Hi
you can use the function Module
CONVERSION_EXIT_ALPHA_OUTPUT in the start routine
to test this go to SE37 --- give the CONVERSION_EXIT_ALPHA_OUTPUT -
>display -
> F8
in the input give 000000456
and execute
the out put will be 456
for getting Zeros you can use
CONVERSION_EXIT_ALPHA_INPUT--- to remove leading zeros
Santosh
Edited by: Santhosh Nagaraj on Oct 29, 2009 10:52 PM
Edited by: Santhosh Nagaraj on Oct 29, 2009 10:54 PM -
Message Mapping, filling field with 0 (zeros) on left
I need to fill a field with values that has variable lenght adding 0 (zeros) on the left, how can I do it ?
I'm using the LENGHT in message mapping, with value returned by LENGHT I use FIXVALUES to map the quantity of 0 (zeros) that I need to add in the field.
Somebody can help me with this problem ?
Thank's.Hi Regis,
You can use the Arithmetic:FormatNum built-in function for this.
If you want to left-pad the number with zeros so that the length is always 10, then specify 10 zeros for the format, 0000000000.
This function takes formats based on java.text.DecimalFormat so you can see all of the possibilities at:
java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormat.html
Thanks,
Jesse -
Fill fields with actual date / timestamp with button
Hello,
I did not find an answer for my following problem.
I want to put a button my adobe form that fills automactically three fields with data from the PC which are:
actual time (of the PC and of course timezone info), date and username, so the User has to press one button to fill all these data for convenience.
So I think it is necessary to program this in JavaScript as an "on-click" action. Since I'am not too much familiar with this, it would be great if someone can post a little sample coding for this (or has some other tipp).
regards and happy xmas
Jörgyou must have target fields for your Date, Time and Username, for example you have a structure in your data view called "ZINFO" with the fields "EDATE", "ETIME","ENAME"
in your layout you need a button where you click on
in the click event you can fill your fields (formcalc)
xfa.resolveNode("xfa.record.ZINFO.EDATE").value = Num2Date(Date(), "DD/MM/YYYY");
xfa.resolveNode("xfa.record.ZINFO.ETIME").value = Num2Time(Time(), "HH:MM:SS", "de_DE");
so you always get time/date when clicking
but how do you know who has opened the form?? did you realize some password protection??
br norbert -
Mandatory fields With reference to Material types
Dear Gurus,
I need to make few fields as mandatory with reference to material types while creation of the material master data.
For example:
For Semi finished and Finished Schedule margin key is required(mandatory)
For Raw Materials Schedule margin key is optional.
Regards,
SiddharthHi
find following step to make field mandatory for material type
Follow the stpes for making field as optional, required entry
1 click the tab ,(Which is u want to be Required entry )and get the field name by pressing F1 key and then
2.Go to T.Code: OMSR and enter that field name and get Selection Group
once you get selection group and field name
3 Use t.Code: OMS2 and click your material type and in next screen check Field reference ( you have assigned for material type; example :;For ROH material type the Field reference is ROH
3. Use T.code:OMS9,, Double Click your Field Reference and select field selection Group , & select round box of Required Entry or optional and save
check following link you will get clear idea [How to configure the fields required for each Material type ?;
Regards
Kailas ugale -
How to map the form fields with zoho crm module?
I am integrating a web app with Zoho CRM,I created a form in .aspx and put some fields on it like first name,last name,email etc.Now i want to map these fields with the zoho crm contacts module,so that when i submit this form it will save the data there.
Sumit BhargavHi Sumit,
ZOHO CRM is third party software, it’s out of our support range. I recommend you have a look at ZOHO Developer API from
http://www.zoho.com/crm/help/api/. If you have any questions about it, you can open thread on their forum for support.
https://forums.zoho.com/.
Thank you for understanding.
Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Show NUMC Type Field with Zeros in SE16
Hi.
Is there any way to show a field of numc type (length 9) with zeros when is shown in SE16???Hi
I am not clear with your question?
Just check the table entries in VBAP
fields VBELN which is of CHAR 10 and
POSNR which of NUMC 6
For both the fields the leading zeros are displayed in SE16
just check it.
so what's your question?
Reward points if useful
Regards
Anji -
Multiplot graph with missing values fills them with zero instead of NaN
I have a waveform graph with multiple arrays (2D) which has different numbers of points in each array. LabVIEW finds the array with the most points and then plots all arrays with that many points. It assigns the missing points a value of zero and displays those zero values. This means arrays with fewer points than the maximum will have values of zero appear in their plots. This can be avoided by filling in missing points with NaN. I am acquiring data in a loop and displaying it which requires continuous determination of the number of actual points and filling in of missing points with NaN. Not difficult, but this could be avoided if LabVIEW would fill missing points with NaN instead of with zero. Any way to have this happen automatically ?
Steve
Attachments:
Graph MultiPlot Missing Data.vi 18 KBYou can also consider using an XY graph so you don't have to do additional data manipulation. See attached for comparison.
Attachments:
Graph MultiPlot Missing Data mod.vi 22 KB -
Adding quantity field for the same material number in Table control
Hello Experts,
I have an requirement, where I need to add the quantity field when the material number is repeated in a table control.
Here I show the pop-up message "Material already exists, do you want to add the quantity". If the user clicks on Yes I need to add the quantity.
I created the pop-up message using the FM " POPUP_TO_CONFIRM" and tried to add the quantity filed using COLLECT statement but I couldn't because my non-numeric field value will be different and it will insert new entry with same material in my internal table.
I have a z data base table & internal table with the below fields in it.
Best Regards,
Manihi deepthi,
chk a sample one which will help u. <b><i>f4 hlp in table control</i></b>
* Screen flow logic........
PROCESS BEFORE OUTPUT.
*MODULE PBO_MODULE.
PROCESS AFTER INPUT.
*MODULE PAI_MODULE.
PROCESS ON VALUE-REQUEST. "F4
FIELD EKPO-EBELP MODULE help_ekpo.
* populate screen field from within PROCESS ON VALUE-REQUEST(F4) call
*& Module help_responsibility INPUT
* text
MODULE help_ekpo INPUT.
**Transport values to table dynpro/screen table control
DATA: l_stepl LIKE sy-stepl,
l_indx LIKE sy-stepl.
DATA: dynpfields LIKE dynpread OCCURS 5 WITH HEADER LINE.
* Adjust for scroling within table control
CALL FUNCTION 'DYNP_GET_STEPL'
IMPORTING
povstepl = l_stepl
EXCEPTIONS
stepl_not_found = 0
OTHERS = 0.
l_indx = tc_ekpotable-top_line + l_stepl - 1.
"tc_ekpotable should already have been declared
REFRESH dynpfields.
CLEAR dynpfields.
dynpfields-fieldname = 'EKPO-EBELN'.
dynpfields-fieldvalue = '00010' "wa_ekpo-ebeln.
dynpfields-stepl = l_stepl.
APPEND dynpfields.
dynpfields-fieldname = 'EKPO-EBELP'.
dynpfields-fieldvalue = '00020' "wa_ekpo-ebelp.
dynpfields-stepl = l_stepl.
APPEND dynpfields.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = 'SAPLZZ_EKKO' "Program name
dynumb = '0100' "Screen number
TABLES
dynpfields = dynpfields
EXCEPTIONS
OTHERS = 0.
ENDMODULE. " help_ekpo INPUT
rgds
Anver
<b><i>if hlped kindly mark points</i></b> -
ERP - SD Sales orders with billing plan (material number change appear)
Sales and Distribution.
Regarding sales orders with billing plan.
We create the sales order and create billing plan at header or item level.
We issue down payment request(s) upon receipt of sales order.
Often during the life time of the sales order one or more of the material numbers are changed after the down payment request(s) has been issued and paid by the client.
Our issue is that prior to changing the material number in the sales order we have to reverse the payment(s), reverse the down payment request(s) and after the material number change re-issue the down payment request(s) and register the payment again.
We wish to find a solution avoiding all the reversals.
If you have a similar situation please inform how to handle material number change in the sales orders with billing plan.
Best regards
LiseDear Consultor SD ,
There is no setting to create the invoice based on schedule line.
What you can possibly do is create multiple deliveries based on the schedule line and
then invoice the individual deliveries.
If you want system to split the deliveries based on schedule line, then you will have to include Schedule line also
in the COMBINATION REQUIREMENT in VTLA.
Thanks & Regards,
Hegal K Charles -
How to fill field with test data in alv grid display
hi all,
i m adding field TEXT to the structure for displaying grid.
i m modifying program like this
DATA: ALV_OUTPUT LIKE HRPDV_EXPIRED_Q OCCURS 0 WITH HEADER LINE.
TYPES : BEGIN OF FS_OUTPUT .
TEXT(20) TYPE C.
INCLUDE STRUCTURE HRPDV_EXPIRED_Q.
TYPES TEXT(20) TYPE C.
TYPES END OF FS_OUTPUT.
DATA: fs_output like table of alv_output.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'TEXT'.
WA_FIELDCAT-seltext_l = 'Abteilungs Struktur'.
wa_fieldcat-tabname = 'ALV_OUTPUT'.
WA_FIELDCAT-COL_POS = '13'.
APPEND WA_FIELDCAT TO P_GT_FIELDCAT.
this is what i have write for diapalying field. but my question is how to fill test data with field TEXT.I m writing like this but not executed in the aboove grid dispaly statement.
loop at alv_output.
*alv_output-text(20) = 'abcdefgh'.
*modify alv_output.
*endloop.
plz tell me how to fill test datahI..,
Your table declaration has to be like this..
TYPES : BEGIN OF FS_OUTPUT .
INCLUDE STRUCTURE HRPDV_EXPIRED_Q.
TYPES TEXT(20) TYPE C.
TYPES END OF FS_OUTPUT.
DATA: ALV_OUTPUT LIKE standard table of fs_output initial size 0.
loop at alv_output <b>into fs_output</b>.
<b>fs</b>_output-text(20) = 'abcdefgh'.
<b>modify alv_output index sy-tabix from fs_output transporting text.</b>
endloop.
Now give this table alv_output to the GRID_DISPLAY function module..
you will get the required output !!
Plz do remember to close the thread when ur problem is solved !!
reward all helpful answers !!
regards,
sai ramesh
Maybe you are looking for
-
Pageflow variable values don't hold between two ajax requests
I have pageflow application(Portal) where I have implemented typeAhead(like google suggest with AJAX) for two select boxes. Here I have to inform the server of the firstbox value after it is selected(with AJAX) to save it in pageflow variable so that
-
The keys on my laptop are smeared and ugly.. how did this happen??
I love my laptop HP G60-243CL Notebook PC .. and do not want to give it up, even to get the keys replaced. I have been an HP client since my first desktop computer in 1995, but am very disappointed that the keys are smeared, almost impossible to type
-
Hello. My apologies if this has been covered before, but I'm having difficulties connecting one of my computers via ethernet to a new 2TB TC. Yesterday I replaced my old TC by copying its configuration file and importing it while setting up the new
-
I recently used a Sony HD camcorder shot some movies connected to the macbook tried to use iDVD didn't recognize format, so I dragged folder from camcorder to Mac hard drive, tried to open the mpg file using Quick time couldn't open it. iMovie too co
-
Adobe Creative Suite 5.5 Design Standard for PC. Installed but program does not launch as folder is empty. An ideas?