How i write the structure for idoc.
hi gurus,
how i write sthructure of an idoc segment.
how i define internal table for header and item level data.
please guid me with an example.
please provide me some programme or threads where programme is wriiten for saving the data through idoc into db.
thanks and regards.
Edited by: Pawan Kumar on Feb 20, 2008 3:14 PM
1. In IDOC type you will be having segments and each segments contains fields
2. When ever you want to create an IDOC, first you have to fill the segments (Fields) with data.
Example:
move-corresponding mard to e1mardm. -> here we are transfer some of the mard data to segmnet e1mardm.
(mass movement)
e1mardm-msgfn = mardkey-msgfn. -> here we are filling the data to segments on fields basis.
I think now it clear to you.
Thanks,
Similar Messages
-
How to write the logic for extending Idocs...
Hi,
Can anybody pls explain how to write the logic for extending IDOCs with an example...
Good suggestions can be appreciated..
Regards,
RamHi Ram,
Generally the IDoc user exit is called at the following places:
1) When the control record is read.
2) After each and every segment in the data record
3) At the end of the data segment processing.
The IDoc user exit interface generally imports IDOC_DATA (data record internal table) table. Now the data records in the internal table should appear in the same order as maintained while defining IDoc structure (WE30 transaction). For SAP standard segment SAP code will take care of this. For extended segment you will have to take care of this aspect by appending the Z-segment in the IDOC_DATA table.
You can do this by:
looping at IDOC_DATA table:
- Do a case-endcase fo IDOC_DATA-SEGNAM (This stores the segment
structure as per the hierarchy).
- Within the case for "Z-segment" you can write the logic for appending
the Z-segment to IDOC_DATA-SDATA.
Hope this gives some clue.
Regards,
Gajendra. -
How to write the code for IMPORT and export in Field exit
Hi,
Using the FB01 tcode with condition as document type (ZF) and company code
i want to substitute values should come in the next screen.
i am passin the document type and the company code in the FB01 initial screen (100) and added field exit for Cost centre.
if the Doc type ZF and company code is 0245 then the field exit shoul trigger and give the defaul cost centre value if it contain any cost centre valu it over write the existing if it is empty i will write the defauls cost centre value.
Thanks & Regards,
Nelsons......Hi,
As i have understood, if ur doc type is ZF and company code is 0245, then you want to pass the value to cost centre field in next screen.
You can use program RSMODPRF. here enter the data element of cost centre field and assign the screen no and program name (for FI docs prg name would be SAPMF05A).
After assigning program and screen no , Create the function module where u have to write an 'if' statement for assigning value to cost centre (i.e export field in FM)
the values for company code and document type can be fetched from their respective parameter ids i.e. BUK and BAR.
Regards,
Seema Jaisinghani -
How to write the query for year revenue and avg
Hello Team
I have the table
create table sale (sale_id varchar2(32) not null, sale_epoch_microsec numeric(18,0)
not null, sale_amount_cents numeric(18,0) not null, customer_id varchar2(32)
not null, industry_id varchar2(32) not null, product_id varchar2(32) not null)The industry the customer is considered to be in can change from sale to sale. sale_epoch_microsec is microseconds since epoch; sale_amount_cents is the value of the sale in pennies.
The data in this is:
Insert into SALE
(SALE_ID, SALE_EPOCH_MICROSEC, SALE_AMOUNT_CENTS, CUSTOMER_ID, INDUSTRY_ID,
PRODUCT_ID)
Values
('s1', 200000000, 69985484589459, 'c1', 'i1',
'p1');
Insert into SALE
(SALE_ID, SALE_EPOCH_MICROSEC, SALE_AMOUNT_CENTS, CUSTOMER_ID, INDUSTRY_ID,
PRODUCT_ID)
Values
('s2', 200000000, 69985484589459, 'c2', 'i2',
'p2');
Insert into SALE
(SALE_ID, SALE_EPOCH_MICROSEC, SALE_AMOUNT_CENTS, CUSTOMER_ID, INDUSTRY_ID,
PRODUCT_ID)
Values
('s3', 6579000000, 6.99675342390895E16, 'c3', 'i3',
'p3');
Insert into SALE
(SALE_ID, SALE_EPOCH_MICROSEC, SALE_AMOUNT_CENTS, CUSTOMER_ID, INDUSTRY_ID,
PRODUCT_ID)
Values
('s4', 6.5866459684979E17, 6.99675343454391E17, 'c4', 'i4',
'p4');
1.) SQL: Write the SQL query to determine, year-over-year, the total revenue and avg. per-product revenue from customers in the 'Gaming' industry.josh1612 wrote:
As in the question it's mentioned that the date is in microseconds,
So i need the guidence to convert that to the date .Convert microseconds to seconds and then you may be able to use the function below which was found here:
http://www.oracle.com/technology/pub/articles/oracle_php_cookbook/fuecks_dates.html
CREATE OR REPLACE
FUNCTION unixts_to_date(unixts IN PLS_INTEGER) RETURN DATE IS
* Converts a UNIX timestamp into an Oracle DATE
unix_epoch DATE := TO_DATE('19700101000000','YYYYMMDDHH24MISS');
max_ts PLS_INTEGER := 2145916799; -- 2938-12-31 23:59:59
min_ts PLS_INTEGER := -2114380800; -- 1903-01-01 00:00:00
oracle_date DATE;
BEGIN
IF unixts > max_ts THEN
RAISE_APPLICATION_ERROR(
-20901,
'UNIX timestamp too large for 32 bit limit'
ELSIF unixts < min_ts THEN
RAISE_APPLICATION_ERROR(
-20901,
'UNIX timestamp too small for 32 bit limit' );
ELSE
oracle_date := unix_epoch + NUMTODSINTERVAL(unixts, 'SECOND');
END IF;
RETURN (oracle_date);
END; -
How to write the code for a panel when using treeview?
Hi,
We are developing a new plug-in in Indesign as based on treeview. we have completed the design part, but we have some doubts in coding..
One dialog widget and three panels(General, fitting, Eventsandscripts).
The .fr file:
resource GeneralPanelWidget (kGeneralPanelResourceID)
__FILE__, __LINE__,
kGeneralPanelWidgetID, // WidgetId
kPMRsrcID_None, // RsrcId
kBindNone, // Frame binding
Frame(0,0,800,500) // Frame
kTrue, // Visible
kTrue, // Enabled
kGeneralPanelTitleKey, // Panel name
StaticTextWidget
kInvalidWidgetID, // WidgetId (default=0)
kSysStaticTextPMRsrcId, // RsrcId
kBindNone, // Frame binding
10, 15, 138, 35, // Frame: left, top, right, bottom.
kTrue, kTrue, // Visible, Enabled
kAlignLeft, kEllipsizeEnd,kTrue, // Alignment, ellipsize style
ksamPrefProjectPathStringKey, // Initial text.
ksamPrefProjectPathTextEditBoxWidgetID // No associated widget
// TextEditBox Widget resource
TextEditBoxWidget
ksamPrefProjectPathTextEditBoxWidgetID, // WidgetId
kSysEditBoxPMRsrcId, // RsrcId
kBindNone, // Frame binding
Frame(140, 15, 420, 35), // Frame (l,t,r,b)
kTrue, kTrue // Visible, Enabled
0, // Widget id of nudge button (0 so we dont get one)
0, 0,// small,large nudge amount
0, // max num chars(0 = no limit)
kFalse,// is read only
kFalse,// should notify each key stroke
kFalse,// range checking enabled
kFalse,// blank entry allowed
0, // Upper bounds
0, // Lower bounds
"", // Initial text
ButtonWidget
ksamChooseProjectButtonWidgetID,
kSysButtonPMRsrcId,
kBindNone,
430, 15, 500, 35,
kTrue, kTrue,
ksamChooseBtnStringKey,
StaticTextWidget
0, // WidgetId (default=0)
kSysStaticTextPMRsrcId, // RsrcId
kBindNone, // Frame binding
10, 45, 138, 65, // Frame: left, top, right, bottom.
kTrue, kTrue, // Visible, Enabled
kAlignLeft, kEllipsizeEnd,kTrue, // Alignment, ellipsize style
ksamPrefImagePathStringKey, // Initial text.
ksamPrefImagePathTextEditBoxWidgetID // No associated widget
// TextEditBox Widget resource
TextEditBoxWidget
ksamPrefImagePathTextEditBoxWidgetID, // WidgetId
kSysEditBoxPMRsrcId, // RsrcId
kBindNone, // Frame binding
Frame(140, 45, 420, 65), // Frame (l,t,r,b)
kTrue, kTrue // Visible, Enabled
0, // Widget id of nudge button (0 so we dont get one)
0, 0,// small,large nudge amount
0, // max num chars(0 = no limit)
kFalse,// is read only
kFalse,// should notify each key stroke
kFalse,// range checking enabled
kFalse,// blank entry allowed
0, // Upper bounds
0, // Lower bounds
"", // Initial text
ButtonWidget
ksamChooseImgpathButtonWidgetID,
kSysButtonPMRsrcId,
kBindNone,
430, 45, 500, 65,
kTrue, kTrue,
ksamChooseBtnStringKey,
StaticTextWidget
0, // WidgetId (default=0)
kSysStaticTextPMRsrcId, // RsrcId
kBindNone, // Frame binding
10, 75, 138, 95, // Frame: left, top, right, bottom.
kTrue, kTrue, // Visible, Enabled
kAlignLeft, kEllipsizeEnd,kTrue, // Alignment, ellipsize style
ksamPrefMasterTempPathStringKey, // Initial text.
ksamPrefMasterTemplatePathTextEditBoxWidgetID // No associated widget
// TextEditBox Widget resource
TextEditBoxWidget
ksamPrefMasterTemplatePathTextEditBoxWidgetID, // WidgetId
kSysEditBoxPMRsrcId, // RsrcId
kBindNone, // Frame 85
Frame(140, 75, 420, 95), // Frame (l,t,r,b)
kTrue, kTrue // Visible, Enabled
0, // Widget id of nudge button (0 so we dont get one)
0, 0,// small,large nudge amount
0, // max num chars(0 = no limit)
kFalse,// is read only
kFalse,// should notify each key stroke
kFalse,// range checking enabled
kFalse,// blank entry allowed
0, // Upper bounds
0, // Lower bounds
"", // Initial text
ButtonWidget
ksamChooseMasterTempButtonWidgetID,
kSysButtonPMRsrcId,
kBindNone,
430, 75, 500, 95,
kTrue, kTrue,
ksamChooseBtnStringKey,
CheckBoxWidget
ksamShowFrameLabelCheckBoxWidgetID, // WidgetId
kSysCheckBoxPMRsrcId, // RsrcId
kBindNone,
Frame( 10, 165, 320, 185) // left, top, right, bottom
kTrue, // Visible
kTrue, // Enabled
kAlignLeft, // Alignment
ksamShowFrameLabelChkBoxTextKey // Initial text
DefaultButtonWidget
kOKButtonWidgetID, // WidgetID
kSysButtonPMRsrcId, // RsrcID
kBindNone, // Binding
320, 380, 390, 400, // Frame (l,t,r,b)
kTrue, kTrue, // Visible, Enabled
ksamPrefSaveStringKey, // Button text
CancelButtonWidget
kCancelButton_WidgetID, // WidgetID
kSysButtonPMRsrcId, // RsrcID
kBindNone, // Binding
400, 380, 470, 400, // Frame (l,t,r,b)
kTrue, kTrue, // Visible, Enabled
ksamPrefCancelStringKey, // Button name
kTrue, // Change to Reset on option-click.
This is for General panel design and we have written the code for this..but we dont know where to call this functions. we implemented this plug-in based on BasicSelectableDialog sample plug-in. please guide me to complete this code.
Thanks in Advance..Your question is not very clear. Have you gone through the PanelTreeView.sdk example in the sdk?
-
How to write the SQL for the following
ID PRODUCT LEAD_FLAG SALES_VOLUME
1 A Y 100
1 B N 200
1 C N 300
1 D N 400
2 A N 10
2 B Y 20
2 C N 30
2 D N 40
I need to calculate the incentive for each ID. The rule is for an ID:
if the the lead flag for a product is N, then check the sales_volume of the product whose lead_flag is Y (product A in case of ID 1, product B in case of ID 2). if the sales_volume of the product with lead_flag = Y is greater than a NUMBER (this NUMBER varies from product to product. for product A it is 20, for product B it is 25, C it is 30 and D it is 40) then incentive = (sales_volume of the product with lead flag N) * 100.Hello, I presume the NUMBER you refer to will be held in a table column somewhere? I'm calling it threshold_num in the test data below (and rec_id instead of ID):
WITH test_data AS (
SELECT 1 REC_ID, 'A' PRODUCT, 'Y' LEAD_FLAG, 100 SALES_VOLUME FROM DUAL UNION ALL
SELECT 1, 'B','N', 200 FROM DUAL UNION ALL
SELECT 1, 'C','N', 300 FROM DUAL UNION ALL
SELECT 1, 'D','N', 400 FROM DUAL UNION ALL
SELECT 2, 'A','N', 10 FROM DUAL UNION ALL
SELECT 2, 'B','Y', 20 FROM DUAL UNION ALL
SELECT 2, 'C','N', 30 FROM DUAL UNION ALL
SELECT 2, 'D','N', 40 FROM DUAL),
test_ref_data AS (
SELECT 'A' PRODUCT, 20 threshold_num FROM DUAL UNION ALL
SELECT 'B', 25 FROM DUAL UNION ALL
SELECT 'C', 30 FROM DUAL UNION ALL
SELECT 'D', 40 FROM DUAL)
-- end test data
SELECT td1.REC_ID, td1.PRODUCT, CASE WHEN td2.PRODUCT IS NOT NULL THEN td1.sales_volume * 100 ELSE 0 END incentive
FROM test_data td1
LEFT JOIN (
SELECT td2.PRODUCT, SUM(sales_volume) sales_volume
FROM test_data td2
JOIN test_ref_data trd
ON (td2.PRODUCT = trd.PRODUCT)
WHERE td2.lead_flag = 'Y'
GROUP BY td2.PRODUCT, trd.threshold_num HAVING SUM(td2.sales_volume) > trd.threshold_num) td2
ON (td1.PRODUCT = td2.PRODUCT)
WHERE td1.lead_flag = 'N';
REC_ID PROD INCENTIVE
2 A 1000
2 D 0
1 D 0
1 B 0
2 C 0
1 C 0
6 rows selected.And two tips: it's always helps to put {noformat}{noformat} before and after your code for readability, and also to provide expected sample output. -
How to write the expression for multiple texbox selection using single textbox status
Hii frnz,
can you see the below image if the value of the text box is stopped means Red i want to display the entire row(all the texboxs values should be displayd in the red colour only) should be display in Red colour only.
How to implemet it is in SSRS reporting side.....
Thanks ! In Advance....Just give an expression as below for the color property
=IIf(Me.Value = "Stopped","Red","Green")
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
How to write the code for screen-exits
halo fellow SAPiens,
I want to add a screen for t-code AS01......for which i have created a sub-screen in the function grp (related to AS01)........now i need to link the sub-screen with the Standard SAP prgm..........i.e call the sub-screen........how can i do it...........pls send me one example for implementing menu-exits,screen exits and
Screen exits - Urgent.
screen exits
Screen exit
Please reward points if helpful... -
How to write the ABAP code for Datasource Enhancment
Hi Team,
Can you please help me how to write the code for the enhancement i have made to the standard datasource
i have added the fields ZZPayer and ZZPayer_access.
I just wanted to know how to write the ABAP code to populate the data for these fields.
Regards,
Pradeep P.Hi
From a performance point of view would like to suggest a few changes :
WHEN '<DS name>'.
select zzfields from <table> into itab
for all entries in c_t_data where <condition>.
If sy_subrc = 0.
loop at c_t_data assiging f_c_t_data.
read itab into wa_itab where key = f_c_t_data-key.
f_c_t_data-zzfield = wa-itab-zzfield.
endloop.
refresh itab.
regards,
aparna
endif. -
How to write complex sql for this
Hi ALL,
I have a requirement like this
I have 5 tables which i have to join to get the result
but there no join column to 2 other table.
I want to get all the applications using cobal,running on UNIX.
How to write the query for this
1.APP
APP_i DESC
1 Accounts
2 Payments
3 order transfer
4 Order processing
2.Techgy
techid techdesc
1 cobal
2 Java
3.APP_Techgy
APP_I Techid
1 1
2 1
3 1
4 2
4.Pltfrm
pltfmid pltfrmdesc
1 Windows NT
2 UNIX
5.APP_Pltfrm
APP_I pltfrmid
1 1
2 1
3 2
4 2
ouput must be
APP_i Desc techDESC pltfrmdesc
3 ordertranfer Cobal UNIX
Thanks in advanceThis ('descr' in place of 'desc')?
SQL> select a.app_i, a.descr, t.techdesc, p.pltfrmdesc
from app_techgy atc,
app a,
techgy t,
app_pltfrm ap,
pltfrm p
where atc.techid = t.techid
and atc.app_i = a.app_i
and atc.app_i = ap.app_i
and ap.pltfrmid = p.pltfmid
order by a.app_i
APP_I DESCR TECHDESC PLTFRMDESC
1 accounts cobal windows nt
2 payments cobal windows nt
3 order transfer cobal unix
4 order processing java unix
4 rows selected. -
HOW TO WRITE USER EXIT FOR EXTENDED IDOC
Can somebody please help me as i need the user exit code for Shipment idoc.
I append the structure of VTTP and add one field with the name of ZDELCST i.e Delivery cost so i want to update that table once the idoc will post.
I have to write the user exit for this but i have no idea how to do this so kindly requesting someone to please write the code for me and i will be very grateful to him/her.
The functional module is IDOC_INPUT_SHIPPL
and there is a CALL CUSTOMER-FUNCTION '012'
this will take us to function module EXIT_SAPLV56I_012
This includes ZXV56U08
Within this include in need to map the delivery cost from the idoc to the new append filed VTTP-ZDELCSThi ,
'EXIT_SAPLHRBEN00GENERAL_014'
1)Goto CMOD tcode.
2)Click on Utilites on Menu bar.
3)Press Shift+F9, below in component name enter
EXIT_SAPLHRBEN00GENERAL_014,
4)F8 , then you will get Exit name PBEN0014
Double Click again Double Click you will get function
FUNCTION EXIT_SAPLHRBEN00GENERAL_014.
within this onel include file is there.
INCLUDE ZXPBEU14.
here you will write your Enhanc Code.
Reward if , you got soln,
Thanks. -
How to define the Structure and FCC parameters for EDI file format.
Hi All,
I have a EDI file(FTP)-->XI-->IDOC
the source file content is as follows
PR H01PHUPS
FH SHP 0.0.5
H1 S0022323
W6 7752508853 D
PT 1Z58R7070341111111
PT 1Z58R7070342222222
PT 1Z58R7070353333333
N1ST ZZ 142222
N3ST 8827 D OLD
N4ST MARCY
N1WH ZZ 2070
N3WH 401 QUALITY
N4WH HARRIS
DTENT20111206
DTSHP201112061754
N9LL BN20700033333333
N9NT
CD CP UPS
IT026
P1GD VN A1111
PD Product ID 1
QTORD000000000000010CA
QTSHP000000000000010CA
AM U 000000000000000000M
AM X 000000000000000000
LTLT 1112811111
AM G 000000000000000000
AM N 000000000000000000
AM TAX000000000000000000
AM SVC000000000000000000
AM COD000000000000000000
ST 00000000100000000010000000000000000000000000008500LB
Can any body share me how to declare the structure in DataType.
The first two characters in each record is constant , so this would be the keyfields right?
ex:- PR,FH,H1,W6,PT,AM,N1,N3,N4......
In Comm channel the FCC parameters
i need to go for fieldFixedLengths?
Thanks&Regards
Sai_SHAHi.
if you need to convert an EDI to XML you need to use an Adapter specific (e.g Seeburger) because PI doesn't support EDI files.
Also if you use a FCC , this configuration is for two level Header and Detail.
Check this.
http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm
Regards
Luis Ortiz -
How to find the number of idocs generated for a customer on the basis of his purchase order in a day ?
Dear Friends,
I am absolutely agree with your answer .
But my question is,
Lets say.....
One customer sending X number of purchase orders in a day , so how many IDocs generated on that specific day for that specific customer .
So, Question is , How can we find the no of sales orders(IDocs) generated for the customers on the specific day ?
Hope you all understood my requirement .
Thanks & Regards,
Aditya -
How to write a requirement for sales order outbound iDOC
i need to write the requirement for sales order IDOC
Please helpHi
From the sales order screen itself you can create the delivery from the menu
Sales order -> deliver/y
or from VL01N , enter shipping point and Order number, create and save
Reward points if useful
Regards
Anji -
How to write the dynamic code for RadioGroupByKey and Check Boxes?
Hi,
Experts,
I have created a WD ABAP application in that i have used RadioGroupByKey and CheckBox Ui elements but i want how to write the dynamic code to that i want to display male and female to RadioGroupByKey and 10 lables to check boxs.
Please pass me some idea on it and send any documents on it .
Thanks in advance ,
Shabeer ahmed.Refer this for check box:
Do check :
bind_checked property is bind to a node with cardinality of 1:1
CHECK_BOX_NODE <---node name
-CHECK_BOX_VALUE <--attribute name of type wdy_boolean
put this code under your WDDOMODIFYVIEW:
DATA:
lr_container TYPE REF TO cl_wd_uielement_container,
lr_checkbox TYPE REF TO cl_wd_checkbox.
get a pointer to the RootUIElementContainer
lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
lr_checkbox = cl_wd_checkbox=>new_checkbox(
text = 'WD_Processor'
bind_checked = 'CHECK_BOX_NODE.CHECK_BOX_VALUE'
view = view ).
cl_wd_matrix_data=>new_matrix_data( element = lr_checkbox ).
lr_container->add_child( lr_checkbox ).
Refer this for Radiobutton :
dynamic radio button in web dynpro abao
Edited by: Saurav Mago on Jul 17, 2009 10:43 PM
Maybe you are looking for
-
I don't have an issue with how the tabs work. But, the other user of my laptop can not distinguish between the concepts of "x" and "+" leading to constant frustration as he opens bookmarks over the tabs he wants left open. I thought it might help if
-
I freely admit I know next to nothing about sound cards... However, a neighbor is having problems and I said I'd investigate: She runs Windows XP on a brand of PC I failed to recognize.< She bought new speakers 2 months ago, and they worked fine unti
-
Charging Mac 4th gen with Win. Cable?
I'm traveling with my TiBook and 4th generation iPod. Forgot my cable to attach iPod to laptop to charge it. Borrowed the USB cable from a Windows mini user and connected it to the laptop. Although the iPod initially appeared on my desktop and the iP
-
Just joined bt and have a real big problem!!!!
hello there i was very happy untill this morning with my new bt infinity package which was installed last tuesday.i have only just realised with horror that i have taken delivery of the wrong tv box.we have chosen a humax youview box when we should h
-
Javax.jms.JMSException: Not supported in XA-backed sessionoutside global tx
I am trying to setup OracleOJMS provider and tries to access queue and post to queue from a normal jsp for testing. I am getting the following javax.jms.JMSException: Not supported in XA-backed session outside global transaction at oracle.j2ee.r