Updation of 'Z' field in database table VBAP & AUFK
Hi,
In my report I wanted to update/modify value in a "Z" field in VBAP and a "Z" field in AUFK table.
Could anyone please suggest me how to update/modify this field value using a BAPI or FM?
Or any other method atleast..
Thanks in Advance,
Rohan.
Hi,
When you want to change the Zfield in VBAP we can go for the BAPI function module-
BAPI_SALESORDER_CHANGE for the given Zfield get the header data and append it to BAPI header structure.
I think we may use the same FM for updating the AUFK also.
Reward points if useful.
Regards
Chandralekha
Similar Messages
-
Need a FM for Updating an Currency field into database table
Hi Friends,
i have a problem, i have a field of type currency .
the value is 14,150.00 ; while updating or inserting these value to database i am geting an error of " unable to interpret 14,150.00";,,,
the problem is with the " , " ( Comma) so is there any functional module so that which delete there comma and i can update it to database...
The same problem arises with date field also ,,,
Please help me out
Thanks and Regards
Kumar MHi you can use this BAPI for converison to internal format.
1. BAPI_CURRENCY_CONV_TO_INTERNAL
For this bapi you need to pass the currrency into which you want to convert like USD, JPY and the amount.
2. To convert data to internal you can use this FM CONVERT_DATE_TO_INTERNAL -
Delete L.H.S spaces from field in database table but not for Report
Dear Experts
I m facing a problem...actaually i have replaced 999 by blank in a field of database table record.
Like : 999 abcde
999999 hjklmn
9999 klplmj
99999 hjsfhh
I have replaced 9 by blank. and using CONDENSE statement i have avoid the left hand side spaces of 9 in the database table.
Means the data is updated in database table following below using Condense.
Like: abcde
hjklmn
klplmj
hjsfhh
Now, the problem is that these spaces is showing in the Report. The left hand side spaces is not deleting from the Report. But these spaces is not showing in the databse table.
Plz tell me wat is the reason and wat is the solution to avoid these space from the Report.
Note: That field is Character Field. KNA1-STRAS
Thanks and Regards,
SwapnikaHello
Try to use
SHIFT c LEFT DELETING LEADING SPACE.
instead of
CONDENSE... -
Add time field in database table
Hi Gurus,
I am trying to add a time field in database table. I know i can add it by using append structure.
but my problem is when records r creating in database table, the time field also populate with respective system time automatically. i think i need to use events but i have no idea how to use.
is there any other method available?
is there any system field for time stamp as date + time?
Regards
GiriRob,
its not updating by table maintainance generator.
I want to add Time field in table ESTDH.
when a new record updated while report version generated the time field also populate with system field.
is it possible?
can anybody help me?
Regards
Giri -
Updation of Custom Fields in AFRU table Using Customerexit
Hi all,
I added two fields in CO11n Tcode using SCREEN EXIT - CONFPP07 and iam trying to update these two fields in AFRU table
using CONFPP05. But iam unable to update these two field .
see this code in CONFPP05
LOOP AT afrud_tab.
afrud_tab-zzshift = wa_afrud-zzshift1 .
afrud_tab-zzoperator = wa_afrud-zzoperator1 .
MODIFY afrud_tab.
ENDLOOP.
Plz help me regarding this..Thanks for reply
Ya i added two fields in confpp07 .
see the code :
*& Include ZXCOFTOP
tables : afrud.
DATA : WA_AFRUD TYPE AFRUD,
IT_AFRUD TYPE TABLE OF AFRUD.
Include ZXCOFU24
MOVE afrud-zzshift1 TO wa_afrud-zzshift1.
MOVE afrud-zzoperator1 TO wa_afrud-zzoperator1.
Even though it is not updating . except these two fields.
Regards,
Srinivas -
How to add a value table to a field in database table?
Dear Experts,
Normally a value table can be added in the domain.
And the field of the database table will have the value table, to which this domain is assigned.
My question is.. Is it possible to assign a value table to any field ina database table, directly?(i.e. <b>without assigning to that domain</b>)
If yes.. please let me know the <b>step-by-step</b> procedure clearly.
Thanks to U in advance.Hi sr,
1. what is the purpose of your value table ?
-- so that the user can select values
from some master table , for that field !!!!
2. This is done by
CHECK TABLE (foreign key concept)
(and not value table)
3. When we create a check table for a field,
then
some DEFAULT table is PROPOSED
. that DEFAULT table is nothing
but PICKED up from the domain of that field,
and shown from the value of VALUE TABLE.
(we can change it however)
4. so for your purpose,
just create a CHECK TABLE.
regards,
amit m. -
Update A Column In A Database Table.
I am unable to update a column in a database table.
For example; I have ten records in an EMP table without having any EMPNO. I want to UPDATE (insert) 10 different EMPNO in a table. How can I do it? All I know is that there are ten records in the table; this means that I cannot use a WHERE clause with different criteria for each row.
Thanks.Try something like this
SQL> select * from emp_1
2 /
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-80 800 20
7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7566 JONES MANAGER 7839 02-APR-81 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
7782 CLARK MANAGER 7839 09-JUN-81 2450 10
7788 SCOTT ANALYST 7566 19-APR-87 3000 20
7839 KING PRESIDENT 17-NOV-81 5000 10
7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
7900 JAMES CLERK 7698 03-DEC-81 950 30
7902 FORD ANALYST 7566 03-DEC-81 3000 20
7934 MILLER CLERK 7782 23-JAN-82 1300 10
14 rows selected.
SQL> insert into emp_1(empno, ename, job, mgr, hiredate, sal, comm, deptno)
2 select null, ename, job, mgr, hiredate, sal, comm, deptno
3 from emp_1
4 where rownum <= 10
5 /
10 rows created.
SQL> select * from emp_1
2 /
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-80 800 20
7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7566 JONES MANAGER 7839 02-APR-81 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
7782 CLARK MANAGER 7839 09-JUN-81 2450 10
7788 SCOTT ANALYST 7566 19-APR-87 3000 20
7839 KING PRESIDENT 17-NOV-81 5000 10
7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7900 JAMES CLERK 7698 03-DEC-81 950 30
7902 FORD ANALYST 7566 03-DEC-81 3000 20
7934 MILLER CLERK 7782 23-JAN-82 1300 10
SMITH CLERK 7902 17-DEC-80 800 20
ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
WARD SALESMAN 7698 22-FEB-81 1250 500 30
JONES MANAGER 7839 02-APR-81 2975 20
MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
BLAKE MANAGER 7839 01-MAY-81 2850 30
CLARK MANAGER 7839 09-JUN-81 2450 10
SCOTT ANALYST 7566 19-APR-87 3000 20
KING PRESIDENT 17-NOV-81 5000 10
TURNER SALESMAN 7698 08-SEP-81 1500 0 30
24 rows selected.
SQL> select max(empno) from emp_1
2 /
MAX(EMPNO)
7934
SQL> create sequence emp_seq start with 7935
2 /
Sequence created.
SQL> update emp_1 set empno = emp_seq.nextval where empno is null
2 /
10 rows updated.
SQL> select * from emp_1
2 /
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-80 800 20
7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7566 JONES MANAGER 7839 02-APR-81 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
7782 CLARK MANAGER 7839 09-JUN-81 2450 10
7788 SCOTT ANALYST 7566 19-APR-87 3000 20
7839 KING PRESIDENT 17-NOV-81 5000 10
7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
7900 JAMES CLERK 7698 03-DEC-81 950 30
7902 FORD ANALYST 7566 03-DEC-81 3000 20
7934 MILLER CLERK 7782 23-JAN-82 1300 10
7935 SMITH CLERK 7902 17-DEC-80 800 20
7936 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7937 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7938 JONES MANAGER 7839 02-APR-81 2975 20
7939 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
7940 BLAKE MANAGER 7839 01-MAY-81 2850 30
7941 CLARK MANAGER 7839 09-JUN-81 2450 10
7942 SCOTT ANALYST 7566 19-APR-87 3000 20
7943 KING PRESIDENT 17-NOV-81 5000 10
7944 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
24 rows selected. -
Update Yes/No field in access table through oracle procedure
Hi,
How to update Yes/No field in access table through oracle procedure. all other fields like AutoNumber, Text I can update it. Yes/No field how to update? Please, any one can help me?
Thanks and Regards,
Sudha.Sudha Teki wrote:
select "fldPost" from tblPHd@ODBCLNKNot quite sure what you mean, but the way you select the column would indicate a case sensitive column name
Look at this example
SQL> create table t
2 ("this" varchar2(10))
3 /
Table created.
SQL> insert into t values ('hello')
2 /
1 row created.
SQL> select *
2 from t
3 /
this
hello
SQL> select this
2 from t
3 /
select this
ERROR at line 1:
ORA-00904: "THIS": invalid identifier
SQL> select "this"
2 from t
3 /
this
helloIs your column name also case sensitive? -
Update of segment field in bseg table
hi
can any explain me about update of segment field in bseg table
segment is mentained in profit center master record ,and i want to generate trial balance segment wise and profit center wise
please suggest me steps to do in a new gl senario
thanks
cbHi,
You need to activate the assign scenarion FIN_SEGM to your ledgers in the below path:-
SPRO> Financial Accounting (New) > Financial Accounting Global Settings (New) > Ledgers > Ledger > Assign Scenarios and Customer Fields to Ledgers
Then you need to make document splitting characteristics based on Segment field in the below path:-
SPRO> Financial Accounting (New) > General Ledger Accounting (New) > Business Transactions > Document Splitting > Define Document Splitting Characteristics for General Ledger Accounting
Make the below entry:-
Field = SEGMENT
Zero Balance = Selected
Partner Field = PSEGMENT
Mandatory Field = Selected
Then you will be able to generate the balance sheet segment wise in report S_PL0_86000028 "Financial Statement: Actual/Actual Comparison". (Similar steps you can use for profir center wise balance sheet in addition.)
Regards,
Gaurav -
Update the Street field in ADRC table.
Hello !! Please I need some help.
I have to update the Street field in ADRC table.
I have this list.
Where I can put a Flag and an Update to do it.
Im really newbie. Im doing it in IDES, to test it first.
Help !
REPORT Z_LIST_ADRC LINE-SIZE 190
LINE-COUNT 65
NO STANDARD PAGE HEADING.
TABLES: ADRC.
DATA: BEGIN OF ITAB OCCURS 0,
ADDRNUMBER LIKE ADRC-ADDRNUMBER,
date_to like ADRC-date_to,
NAME1 LIKE ADRC-NAME1,
CITY1 LIKE ADRC-CITY1,
CITY2 LIKE ADRC-CITY2,
STREET LIKE ADRC-STREET,
MC_NAME1 LIKE ADRC-MC_NAME1,
MC_CITY1 LIKE ADRC-MC_CITY1,
MC_STREET LIKE ADRC-MC_STREET,
END OF ITAB.
SELECT ADDRNUMBER DATE_TO NAME1 CITY1 CITY2 STREET MC_NAME1 MC_CITY1 MC_STREET
FROM ADRC INTO TABLE ITAB.
LOOP AT ITAB.
WRITE : /001 ITAB-ADDRNUMBER,
007 ITAB-DATE_TO,
016 ITAB-NAME1,
040 ITAB-CITY1,
070 ITAB-CITY2,
090 ITAB-STREET,
120 ITAB-MC_NAME1,
150 ITAB-MC_CITY1,
170 ITAB-MC_STREET.
ENDLOOP.
TOP-OF-PAGE.
ULINE.
WRITE: /001 'n-addr',
007 'date',
016 'name',
040 'city1',
070 'city2',
090 'street',
120 'name-s',
150 'city1-s',
170 'city2-s'.
ULINE.HI,
data : itab like standard table of adrc.
select * from adrc into table itab.
loop at itab.
itab-street2 = 'New value'.
modify itab index sy-tabix.
endloop.
if not itab[] is initial.
modify adrc from table itab.
endif. -
I'm new to VS. I have run the following code. It does not produce any error, and it does not add or update data to my Access database table.
dbUpdate("UPDATE prgSettings SET varValue='test' WHERE varSetting='test'")
Function dbUpdate(ByVal _SQLupdate As String) As String
Dim OleConn As New OleDbConnection(My.Settings.DatabaseConnectionString.ToString)
Dim oleComm As OleDbCommand
Dim returnValue As Object
Dim sqlstring As String = _SQLupdate.ToString
Try
OleConn.Open()
MsgBox(OleConn.State.ToString)
oleComm = New OleDbCommand(sqlstring, OleConn)
returnValue = oleComm.ExecuteNonQuery()
Catch ex As Exception
' Error occurred while trying to execute reader
' send error message to console (change below line to customize error handling)
Console.WriteLine(ex.Message)
Return 0
End Try
MsgBox(returnValue)
Return returnValue
End Function
Any suggestions will be appreciated.
Thanks.You code looks pretty good, at a quick glance. Maybe you can simplify things a bit.
For Insert, please see these samples.
http://www.java2s.com/Code/CSharp/Database-ADO.net/Insert.htm
For Update, please see these samples.
http://www.java2s.com/Code/CSharp/Database-ADO.net/Update.htm
Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.
Best to keep samples here to VB.NET
Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. -
How to update a custom field of MARC table using BAPI_MATERIAL_SAVEREPLICA
Hi,
I want to update a custom field (Appended field) of MARC table using BAPI_MATERIAL_SAVEREPLICA. Please help me in this issue. I cannot use BAPI_MATERIAL_SAVEDATA as this updated the MARC table record by record. I have to update bulk records at a time.
Thanks
Rahul.Hi,
Use the Documentation given for struture in BAPI docuemntation...
For loading data into custom fields of MARC use the structure - BAPI_TE_MARC.
First, structures BAPI_TE_<NAME> (<NAME> = MARA, MARC, MARD, MBEW, MLGN, MLGT, MVKE, MARM, MAKT) and the appropriate check structures BAPI_TE_<NAME> (<NAME> = MARAX, for example) have to be extended by the customer to include the required fields. The structures that are delivered as standard only contain the relevant key fields. When new fields are added to this structure, you should ensure that a field has the same name as the field in the database table. Furthermore, the fields in the structures BAPI_TE_<NAME> can only be CHARACTER fields. Data element BAPIUPDATE is to be used for the fields in the check structure (exception to this: key fields.)
Parameters EXTENSIONIN and EXTENSIONINX are used for transferring data to the method. Field STRUCTURE contains the name of the structure (for example, BAPI_TE_MARA or BAPI_TE_MARAX). This names is used to identify the work area (for example, WA_BAPI_TE_MARA or WA_BAPI_TE_MARAX) to which the data is transferred. The remaining fields in parameters EXTENSIONIN or EXTENSIONINX contain data for the key fields (for example, the material number) and the data for customer-specific fields. The number of characters reserved in both parameters for the contents of the customer-specific fields must match the number of characters for the relevant field in the work area. If the number of required characters is less, the remaining characters are left blank. Only when all characters have been filled can the contact for an additional field be transferred. Bear in mind that only data for which an appropriate indicator has been set in the work area can be updated to the database.
Regards,
Bhargava -
Handling update and insert in a database table
Hi guys,
I have some data in a database table which I created.Every day some new records come into the table.what i want is that if the account no of the new record which comes say today already exists in the table hen I do not insert a new record but only update the value field related to the account no.
Being more explicit:
say my table has two columns
acc no value.
10 3500
Now as for the existing account no 10 say a new value 300 comes in I want that a new field is not created rather the value is made to 3500+300.
and if an accno 20 comes which is not there in table a new row is aded for that.
Any suggestions would be appreciated.
ThanksHi
you can do the following way.
report ztest.
data: begin of itab occurs 0,
accno type char10,
value type i,
end of itab.
data: it_acc like itab occurs 0 with header line,
it_acc1 like itab occurs 0 with header line.
Assume already value in itab.
select *
into table it_acc
from zacc
for all entries in table itab.
where accno eq itab-accno.
loop at it_acc.
collect it_acc to it_acc1.
endloop.
loop at itab.
collect itab to it_acc1.
endloop.
modify zacc from table it_acc1.
Reward points, if it is useful.
Regards
Raja.
Edited by: Ravindra Raja on May 28, 2008 5:38 PM -
How to update small letters into a database table
Hi Guys,
Iam updating a database table. I want to update lower case letters into the table. But by default all the lower case gets converted to Uppercase. How to acheive this requriement.?
Regards.
Harish.hi
On the domain of the particular field , within the definition tab you have to select the lower case check box . Only if this is checked then alone the values with lower case will be saved else it will be converted to upper case by default.
Hope this will answer your need.
Please give 10 points
- Dheepak -
What is the Function MOdule that returns the fields in database table order
Hello Folks
I have a dynamic internal table with fields ( which are not in order). I want to display them in the order of which they are present in the database table? Is there any function module that returns the fields in database order?
FAQ. Please search before posting your question.
Edited by: Suhas Saha on Oct 10, 2011 10:19 PMHi,
You can use this BAPI.
<b>BAPI_SALESORDER_GETLIST</b>
Reward if useful.
Regards,
Vimal
Maybe you are looking for
-
Time capsule produces a signal, but won't connect or backup
I have looked at some of the other discussions here; some are similar, but I can't find an answer. I have a TC, Macbook Pro and an iPhone 4, all between 6-10 months old. My problems started when I turned on all my stuff after being away for 4 weeks
-
How do i download my photo's from my iphone 6 to my home computer
It use to do it on its own, but now I cant seem to get it started
-
Installing Oracle 10g release 10.1.0.3
Why not I can install Oracle Server in a Linux x86 64 Bits with Red Hat Enterprise v.4 ??? one requisite it's a Linux kernel 2.4 minimun... I copy this from installation archive log: root > cat installActions2005-10-28_01-33-11PM.log Using paramFile:
-
To Find Out In Which PC has this user logged in
Dear All, Will i be able to the User dtls wtih respect to an User ID as to which PC has logged into. The problem is a person changed soem documents and the user is denying it . So i was try to find out if we can get the PC number to which he has logg
-
I broke my iPhone Screen and I live in Australia. What do I do???
Hi there, My american relaitive came to visit australia and gave me an iPhone for a presant and the other day I was walking and had my iPhone in my pocket and fell over and cracked my screen next to the right of the menu button and I dont know how to