BAPI for displaying data of standard tables
Dear All,
Could anybody tell me the name for BAPI to display data in standard tables
i.e. import : table name and
fields
Output : table entries ( data in those tables )
thanks.........
why dont u write ur own code for tht
in the selection screen take the name of table now use a field symbol to create an internal table of type tht table now use select query to get the data
Similar Messages
-
Need some logic for displaying data from Internal Table
Hi Guys,
I have a Internal Table with multiple entries.
My ITAB looks like below.
PN VBELN MATNR MATKX
1 111 P-101 XXX
2 121 P-102 XYZ
2 112 P-103 ABC
3 134 P-104 DEF
3 124 P-105 EFG
Now my requirement is I need to display the out put as follows through ALV or normal display.
<Header> <Date>
<Time>
PN = 1
VBELN MATNR MATKX
111 P-101 XXX
<Footer>
Some gap (May be a line to differentiate)
<Header > <Date>
<Time>
PN = 2
VBELN MATNR MATKX
121 P-102 XYZ
112 P-102 ABC
<Footer>
Some gap (May be a line to differentiate)
<Header > <Date>
<Time>
PN = 3
VBELN MATNR MATKX
134 P-104 DEF
124 P-105 EFG
<Footer>
Thanks in Advance.
Prasad.HI,
Use:
Data: W_PNlike PN.
LOOP AT ITAB.
If Itab-PN ne W_PN.
<Header> <Date>
<Time>
PN = 1.
VBELN MATNR MATKX >>>>>>>>>>>>>>>First Line enter
ELSE.
VBELN MATNR MATKX > line Next entry
ENDIF.
W_PN = ITAB-PN.
AT-END PN.
<Footer>
ENDAT.
ENDLOOP.
Hope this resolve your issue.
Regards,
Gurpreet -
Display data from diferent tables
My requirement is to display data from diferent tables supose tables likeVBAK and VBAP.it will allow for all entries concept oops abap?.
how to write code for display data from diferent tables .
method WDDOINIT.
data:
node_sflight type ref to if_wd_context_node,
Itab_sflight type standard table of SFLIGHT.
select * from SFLIGHT into table Itab_sflight.
node_sflight = wd_context->get_child_node( name = 'SFLIGHT_NODE' ).
node_sflight->bind_table( itab_sflight ).
endmethod.
Thanks,
RamaHI,
IS IT CORRECT WAY OF DONIG CODING?
IF I AM WORNG PLEASE SUGEST ME.
method WDDOINIT.
data:
node_sflight type ref to if_wd_context_node,
final type standard table of vbap.
types: begin of t_vbak,
vbeln type vbak-vbeln,
end of t_vbak.
endmethod.
data wa_vbak type t_vbak.
data i_vbak type standard table of t_vbak.
types: begin of t_vbap,
vbeln type vbap-vbeln,
posnr type vbap-posnr,
matnr type vbap-matnr,
end of t_vbap.
data wa_vbap type t_vbap.
data i_vbap type standard table of t_vbap.
select vbeln from vbak into table I_vbak.
select vbeln posnr matnr from vbap into table I_vbap
for all entries in I_vbak
where vbeln = i_vbak-vbeln.
loop at I_vbak.
read table i_vbap with key vbeln = I_vbak-vbeln.
final-vbeln = I_vbap-vbeln.
final-posnr = I_vbap-posnr .
final-matnr = I_vbap-matnr .
append final.
clear final.
endloop.
node_sflight = wd_context->get_child_node( name = 'NODE_VBAP' ).
node_sflight->bind_table( final ).
endmethod.
Thanks,
rama -
How to Fetch Data From Standard Table MARA and Display using BOPF ?
Hello All,
In BOPF creation of Quey to a node fetches data from the Data Base Table attached to that Node,
But in my requirement I have to fetch data Present in a Standard table and Display it in the FPM List Using FBI.
** Can we Fetch the data From Standard Table and fill the Node in BOPF, Is this possible as the standard Table do not contain KEY field which BOPF uses for Data Fetching ?
Kindly share your Idea's .
Thanks in Adv.Hi Dhivya,
Thanks For your Response.
In my Requirement I want to make ROOT Node as Transient Node.
When I create a Sub Node to a Root Node, I am able to get this option to make this sub node as a Transient Node .
By selecting 'Standard<-->Extended' option in the Menu item 'GoTo' I am able to get this Transient Node check box field for the Sub Nodes.
I want to make a ROOT Node as a Transient Node.
(Which Version you are using, and which transaction you are using to create BO . we are using BOBX Transaction, Version Ehp 6 )
Kindly Guide me .
Thanks,
Kranthi Kumar. -
Can i change or modify or insert the data in standard tables
hi gurus
can i change /modify/insert the data in standard tables
witout using module pools
plz send the progem lines also
it ll be very helpful to me
thank you
kals.Hi Kalyan,
It is not advisable to update standard tables directly or through your own module pool programs also. The reasons are,
1. It is difficult to find out how many tables are updated through the transaction. if we leave one table also as Mr.Andrew said data integrity will be lost.
2. Authorization objects and profiles will be totally bypassed if data is inserted through custom programs.
3. Complete data validation is not possible. There are certain validations that are executed through code and appropriate errors and warnings are shown in the transactions. If we insert data directly to the tables anything can be inserted into the table field violating all the validations unless we have field level check constraints on the tables at database level.
4. User Exits and BADIs that are implemented for specific business requirements and checks will not function on the data.
5. Update & Transaction locks will not work properly.
Due to above reasons, definitely you should avoid updating standard tables directly.
There are many tools such as LSMW Recordings, BDCs, BAPIs, IDOCs, Upload Interfaces available in SAP through which bulk data can be updated without using relevant transactions.
You can collect data from end users in text or excel sheets or through custom programs in required format and upload at once through above mentioned tools.
Regards,
Hema -
How to store custom data in standard tables?
How can I to store data in standard tables without creating a Z table?
I want to store the next rows:
SRD 100 R3D 100
SRD 110 R3D 110
SRD 120 R3D 120
SRD 130 R3D 130
But I prefer to avoid to use a Z table because the maintenance in a upgrade system.
Somebody knows if some standard data type exists?
Or how to make it to avoid the creation of a Z table?Hi Juan,
The data store in the standard table is also custom data. If it is a customizing table then you can very easily add data using SM30 or if it is transaction table then use any transaction to create the data.
If you want to add more fields in the existing table (extra columns) then you can use APPEND or INCLUDE structure.
Regards,
Atish -
I am using a bapi for getting data into infotype BAPI_EMPLOYEE_GETDATA.
Is there any BAPI for updating data ?
regards
Balajithese links might be useful...
http://help.sap.com/saphelp_nw70/helpdata/EN/44/b78765378b56a5e10000000a1553f6/content.htm -
Good morning frnds,
i hav a doubt that can we insert data into a standard tables
such as "mara" or "marc" using module pool proramming.
plzz suggest.
regards,
satyaThnk u frnds,
Then u mean to say that we can update the data in standard tables using
insert in module pool programming.
thking u again,
regards,
satya -
BAPI for displaying and updating table KOTG001?
Please suggest what BAPIs to use.
Henninghi ,
u dont have any bapis for updatign specific tables
bapis are generally used for updating a transaction i mean number of tables
where is the use of the tables u can search bapis in transaction bapi
and where are the tables used i guess in fi/co so u can search under them
regards
afzal -
Help for "insert data to variable tables"
hi, guys.
I want to make a tool to upload mass-data then insert the data to tables of SAP for integrative test.
for example, to input the object tablename "AAAA" from screen, the program willl find the information of this table then input the data to the "AAAA" tables.
But i have no idea how to define the internal table to suit various tables ( by define dynamic table? or any other ways) ,could you kindly give me some advice?
thanks a lot in advance.
Message was edited by:
huijuan zhaohi zhao,
welcome to sdn,
for your requirement u can use bdc to upload file to internal table then u can update these internal table fileds to sap tables.
or
use <b>gui_upload</b> function module to upload data to internal table then u can use just <b>insert</b> keyword to update sap tables.
see this sample code to update the database table <b>edpar</b>,
report zsd_edpar_update no standard page heading.
*&Purpose:
*& program will be used to update EDAPR table on a daily basis.
*& This update will be based on Customer Sold To / Ship To partner
*& functions assignment. Ship To customer(s) will be linked to
*& the appropriate Sold To customer using the ?Acct at Cust?
*& number as a reference. Then, Ship To customer(s) will be
*& set up withthe appropriate partner function with the Sold
*& To customer.it updated the DB tabel and gives the information
*& of customer level visibility t account receivable.
*define database tables...
tables: edpar,
knvv,
knvp.
*define types...
types: begin of t_tab_edpar,
mandt type mandt,
kunnr type kunnr,
parvw type parvw,
expnr type edi_expnr,
inpnr type edi_inpnr.
types: end of t_tab_edpar.
types: begin of t_tab_knvv,
kunnr type kunnr,
vkorg type vkorg,
vtweg type vtweg,
spart type spart,
eikto type eikto.
types: end of t_tab_knvv.
types: begin of t_tab_knvp,
kunnr type kunnr,
vkorg type vkorg,
vtweg type vtweg,
spart type spart,
parvw type parvw,
kunn2 type kunn2.
types: end of t_tab_knvp.
type-pools: slis.
*define data statments...
data: g_tab_edpar type standard table of t_tab_edpar,
g_wa_edpar like line of g_tab_edpar.
data: g_tab_edpar1 type standard table of t_tab_edpar,
g_wa_edpar1 like line of g_tab_edpar1.
data: g_tab_edpar2 type standard table of t_tab_edpar,
g_wa_edpar2 like line of g_tab_edpar2.
data: g_tab_knvv type standard table of t_tab_knvv,
g_wa_knvv like line of g_tab_knvv.
data: g_tab_knvp type standard table of t_tab_knvp,
g_wa_knvp like line of g_tab_knvp.
data: repid like sy-repid,
l_tab_fieldcat type slis_t_fieldcat_alv,
l_tab_fieldcat1 type slis_t_fieldcat_alv,
l_tab_fieldcat2 type slis_t_fieldcat_alv,
layout type slis_layout_alv,
events type slis_t_event,
events1 type slis_t_event,
wa_events like line of events,
l_pos type i.
*selection screen...
selection-screen begin of block b1 with frame title text-001.
select-options: s_cust for knvv-kunnr obligatory,
s_sorg for knvv-vkorg,
s_dcha for knvv-vtweg,
s_divi for knvv-spart,
s_parf for knvp-parvw.
selection-screen end of block b1.
*start-of-selection...
perform get_data.
*to update the db table edpar...
perform update_edpar.
*display alv block...
perform alv_block.
*& Form get_data
text
--> p1 text
<-- p2 text
form get_data .
select kunnr
vkorg
vtweg
spart
parvw
kunn2
from knvp
into table g_tab_knvp
where
kunnr in s_cust
and
vkorg in s_sorg
and
vtweg in s_dcha
and
spart in s_divi
and
parvw in s_parf.
loop at g_tab_knvp into g_wa_knvp.
move: g_wa_knvp-kunnr to g_wa_edpar-kunnr,
g_wa_knvp-kunn2 to g_wa_edpar-inpnr,
g_wa_knvp-parvw to g_wa_edpar-parvw.
append g_wa_edpar to g_tab_edpar.
endloop.
if not g_tab_knvp[] is initial.
select kunnr
vkorg
vtweg
spart
eikto
from knvv
into table g_tab_knvv
for all entries in g_tab_knvp
where
kunnr eq g_tab_knvp-kunnr
and
vkorg eq g_tab_knvp-vkorg
and
vtweg eq g_tab_knvp-vtweg
and
spart eq g_tab_knvp-spart.
loop at g_tab_knvp into g_wa_knvp .
sort g_tab_knvv by kunnr.
clear g_wa_knvv-eikto.
read table g_tab_knvv into g_wa_knvv with key kunnr = g_wa_knvp-kunnr.
if sy-subrc eq 0.
move: g_wa_knvv-eikto to g_wa_edpar-expnr.
modify g_tab_edpar from g_wa_edpar transporting expnr where kunnr eq g_wa_knvp-kunnr.
endif.
endloop.
endif.
sort g_tab_edpar by kunnr.
delete adjacent duplicates from g_tab_edpar comparing kunnr parvw.
endform. " get_data
*& Form update_edpar
text
--> p1 text
<-- p2 text
form update_edpar .
delete from edpar." FROM TABLE g_tab_delete.
call function 'DB_COMMIT'.
loop at g_tab_edpar into g_wa_edpar.
insert into edpar values g_wa_edpar.
if sy-subrc eq 0.
move-corresponding g_wa_edpar to g_wa_edpar1.
append g_wa_edpar1 to g_tab_edpar1.
else.
move-corresponding g_wa_edpar to g_wa_edpar2.
append g_wa_edpar2 to g_tab_edpar2.
endif.
endloop.
reward points if helpful,
regards,
seshu. -
Display data on ADF table using a VO binded to a message.properties file
Hi,
I want to display data in a JSPX page using ADF table which is based on a ViewObject. The attributes of the ViewObject should get it's value from a abc.properties file(static file).How can i achieve this.
thanks in advance.
regards,
Himanshu.Hi Himanshu,
When you create a VO based on static values, all of the records from your VO are generated into the MessageBundel.properties file like this
devguide.entity.ViewObj.SL_0_0=1
devguide.entity.ViewObj.SL_0_1=<val1>
devguide.entity.ViewObj.SL_0_2=<val2>
devguide.entity.ViewObj.SL_1_0=2
devguide.entity.ViewObj.SL_1_1=<val1>
devguide.entity.ViewObj.SL_1_2=<val2>
You could add more lines to the properties files maintaining the same pattern. Also noticed that you can read all the values from a CSV file as well.
The last resource is to programmatically read the file and start creating new rows on the VO, which won't use any of the declarative tools for VOs.
-Juan Camilo. -
How to display data in a table on the screen
Dear members,
I have to display data from the database in a table on my screen when the page loads.
I have created the VO and the AM and made the mappings for the columns i want to display but the table on my screen is not fed when the page loads.
I have created my "table" region with the columns to display but i don't know the code to implement in the processRequest of the AM and the VO to display thes results of the VO query when the page loads.
Thanks in advance for your answers.Hi,
In CO Process Req:
import xxx.oracle.apps.pa.setup.server.ApplicationModuleAMImpl ;
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
ApplicationModuleAMImpl AM=(ApplicationModuleAMImpl )pageContext.getApplicationModule(webBean);
AM.init();
In AM:
public void init()
searchVOImpl Searchvo=getsearchVO1();
Searchvo.executeQuery();
Note:
This is simple execute query.
Regards
Meher Irk -
Bdc for ip01, data upload in table control
I was working on a bdc for ip01 . there is a table control - whose 5 rows are visible and I need to fill data upto 6 row . 6th row get filled by scrolling . will scrolling get captured in recording . whether this is possible or not sir . If yes then how?
Sir please help me.
With regards,Hi
Scrolling does not get recorded while recording. You can achieve it by having ok_code to p+ or p++.
Refer the following link for detailed description.
http://wiki.sdn.sap.com/wiki/display/ABAP/BatchInputFAQ#BatchInputFAQ-Howtoscrollatablecontrol%3F
Hope this helps you.
Regards
Vinodh -
Need FM for displaying date as output EX:april 07
Hi All,
I have a problem in displaying date for example:
If i give period as 3 and year as 2007,
the output should be displayed as april-07.
Can any one help me out in finding a solution.
Thanks in advance.Hi,
Use the below logic.
data: it_months like t247 occurs 0 with header line.
data: v_text(20).
CALL FUNCTION 'MONTH_NAMES_GET'
EXPORTING
LANGUAGE = SY-LANGU
TABLES
MONTH_NAMES = it_months
EXCEPTIONS
MONTH_NAMES_NOT_FOUND = 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 it_months with key mnr = sy-datum+4(2).
if sy-subrc = 0.
concatenate it_months-ltx '-' sy-datum+2(2) into v_text.
endif.
write:/5 v_text. -
How to,Pass HASHED table data to STANDARD table
i have itab1 as Hashed.
when i pass this as out put table for
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
it gives me error,saying hashed type cannot be used..
please suggest the remedy..IT_DEV2[ ] = IT_DEV[ ].
seems to be right..it works fine in this code....but if the selected records are huge it gives irrelevant values
REPORT ZMONTHLY_STOCK .
DATA : IT_DEV TYPE ZBIW_MNTH_STK_L .
DATA : IT_DEV2 LIKE STANDARD TABLE OF ZBIW_MNTH_STK.
*Selection-Screen
Parameters : LFMON type LFMON obligatory,
LFGJA type LFGJA obligatory,
BWKEY type BWKEY.
START-OF-SELECTION.
SELECT e~MATNR e~BWKEY e~LFGJA e~LFMON e~LBKUM e~SALK3 l~MTART
l~MATKL l~MEINS f~WAERS FROM
MBEWH AS e INNER JOIN
MARA AS l ON e~MATNR = l~MATNR
INNER JOIN
T001K AS n ON e~BWKEY = n~BWKEY
INNER JOIN
T001 AS f ON n~BUKRS = f~BUKRS
INTO CORRESPONDING
FIELDS OF TABLE it_dev
WHERE
e~LFGJA EQ LFGJA AND e~LFMON EQ LFMON.
IF SY-SUBRC = 0.
IT_DEV2[] = IT_DEV[].
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-CPROG
I_STRUCTURE_NAME = 'ZBIW_MNTH_STK'
TABLES
T_OUTTAB = IT_DEV2.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
Maybe you are looking for
-
I have updated my itunes and computer software, as well as held down both the lock and home buttons on my iphone. I have contacted my carrier tech support and apple tech support but nothing has worked thus far.
-
Multiple source messages in transformation step in bpm
Hello, I am using a transformation step in bpm, I have two source messages and 1 target message, I got an error 'expression must return the interface type XXXX(in source message)', I checked my source message in interface mapping and the container el
-
Stanging indicator change in control cycle after production order released
HI We have MM PP interface active i setup staging indicator 4 for one material via control cycle Production order is created and released now we would like to change staging indicator to 1 [pick parts] how we reread control cycles data in production
-
Screen flash disabled but happens anyway
My Mac has started flashing the screen instead of beeping. It's exactly the same effect as you'd get if the Accessibility pref pane's "flash the screen" option was enabled, except that it's not enabled. The checkbox in System Preferences is not check
-
Bid Comparison - No table for a comparison
Hello everybody, I have a problem in the SAP Bidding Engine, exactly at the bid comparison. The user changes personal settings for his view (top right in the table) - trying to get a better view of bid comparison - this takes the effekt that the tabl