RFC code for Adding Customer Record
Dear all
Can any body provide RFC code for adding a record
in customer table ( KNA1) ?
regards
- Victor
Victor,
I created a remote-enabled function module (z_customer_create) which calls SD_CUSTOMER_MAINTAIN_ALL. The 'z' function module was published as a web service and is working well. We did have a few hurdles but there are many forum posts for FM SD_CUSTOMER_MAINTAIN_ALL that will help should you run into trouble.
Similar Messages
-
Screen Exit for adding custom fields in Additional Data tab in ME21N
I need a screen exit or whatever other method for adding custom fields to the additional data tab at header level.
I also need a similar exit for adding a filed at item level.
Thanks in advance
MartinHello,
1st find badi or exit and then create screen ...and assign the screen group and screen no for that implementation....some steps i can give u i did with SPRO tcode....
please check it for VA02
SPRO u2013 SAP Reference IMG --- Logistics General --- Basic partner u2013 customers -- Control u2013 Adaption of customers own masters data element u2013 prepare modification of customer free enhancement of customer master record
1)Screen group description
zs creating badi --- (save)
click on (label tab pages) u2013 new entries
number u2013 10 , function code u2013 zs10 , description u2013 func ---(save) u2013(back)
2)select (FM_CUSTOMER_ADD) u2013 copy
Implementation name u2013 ZAS
(desc u2013 impl for cust) u2013 (save)
interfaceu2014(check_add_on_active) double click on it
3)the above screen appear -- write the code in it u2013 (save) --- (activate) u2013 (back) u2013 (save)
-- (activate) u2013 (back)
Business adds in customer sub screens
4)select (FM_CUSTOMER_ADD) u2013 copy
Implementation name u2013 ZAS1
(description -- cust) u2013 in attribute u2013 (give screen group name)
5)go to interfaces (GET_TAXI_SCREEN) double click on it
(save) --- (activate)
6)(SAVE) --
Goto SE38 -- CREATE PROGRAM WITH NAME (ZQW) type module pool
Goto SE51 -- Prog : ZQW
Screen : 200 (Create)
Goto layout u2013 design the screen
7)save u2013 activate
then goto transaction : va02
For User Exit's
goto to tcode->status->program name->double click on that,
then goto to-> attribute take the package name and
Goto SMOD tcode ->Utilities->give the package name and F8
then a list of exits will display for that tcode as well as that package.
u can check the table MODSAP
u can check the table MODACT
For BADI's,
1)goto to tcode SE24 give the CL_EXITHANDLER and display and then double click on the GET_INSTANCE
keep Break point at this location 'call method cl_exithandler=>get_class_name_by_interface'
then the tcode it will trigger there and we can debugg there we can find badi'for that tcode and then remove the break point.
2)Goto to tcode->status->program name->double click on that program will display's
then press crtl+F then cl_exithandler
Thank u ,
santhosh -
Transaction code for adding new character
hi ,
i am new member of this group.I want to know the transaction code for adding a new character in BW.
please help me.
Thanks in advance,
reenaHi reena,
When you say "adding a new character in BW" you want to create a new characteristic (InfoObject) in BW or you want to add a new char to BW?
Modeling in BW is done at tocde RSA1 & go to relevant tab on left screen (dataprovide, InfoObjects etc) & right click to create Objects.
hope it helps
regards
VC -
T code for maintaing condition record in MM pricing
Hiii ..MM GURUS...
Can anyone let me know the transaction code for maintaing condition records for condition types in MM pricing .
Regards
SARFRAZ..MEK1 with appropritate key combination
-
Sample code for a custom field added to LIS Communication structure for Del
We appended a new custome field into extraction structure of the LO Cookpit datasource 2LIS_02_ITM through RSA6. And then run CMOD to write the exit code to populate the value and it works fine. But after we read Roberto's Weblog:
/people/sap.user72/blog/2005/02/14/logistic-cockpit--when-you-need-more--first-option-enhance-it
Find the enhancement we did can't make the Delta mechanism works if only this new field gets changed in a record, and the change cannot be reflected on BW. I know we can run SMOD on the enhancement LEINS001 to write the code for LIS Communication structure customer exit. But we have never writen such a code for LIS Communication Structure enhancement and also don't know on how to make the Delta mechanism works in the code. We would be very appreciated if some expert here can provide the sample code!
Thankshi AHP,
Have you tried Sanyam's code listed in this article you recommended?
Now our R3 team has added a custom field called ZZZ to EKKO table and I modify the code to suit our need and the code would be as following:
*& Include ZXM06U16 *
DATA: i_t_ekko LIKE ekko OCCURS 1 WITH HEADER LINE.
DATA: ebeln LIKE ekpo-ebeln,
it_ekko TYPE TABLE OF ekko WITH HEADER LINE,
old_val(50) TYPE c. "For storing the value from the Field Symbol
FIELD-SYMBOLS <fs> TYPE ANY TABLE.
CASE zeitp.
WHEN 'MA'. "When creating a purchase order
MOVE '(SAPLEINS)T_EKKO[]' TO old_val.
ASSIGN (old_val) TO <fs>.
i_t_ekko[] = <fs>.
LOOP AT xmcekko.
ebeln = xmcekko-ebeln.
IF xmcekko-supkz = '1'. "Old Value ?
SELECT SINGLE * FROM ekko INTO it_ekko WHERE ebeln = ebeln.
xmcekko-ZZZ = it_ekko-ZZZ.
ELSE. "New Value ?
READ TABLE i_t_ekko WITH KEY ebeln = ebeln.
xmcekko-ZZZ = i_t_ekko-ZZZ.
ENDIF.
MODIFY xmcekko.
ENDLOOP.
EndCase.
The compile of the above code works fine and we activated everywhere including project level. Then we set debug points in this code, and run RSA3 on 2LIS_02_ITM, but find the extraction program never reaches this code or call this user exit function EXIT_SAPLEINS_001 of this enhancement LEINS001. Any reason?
Thanks
Kevin
Message was edited by: Kevin Smith -
Looking for an ABAP-code for the customer-Exit Variable
Hello,
I have defined a Variable (Interval) which should be processed through Customer-Exit on characteristic Supplier-Date (date format). This Customer-Exit Variable is called ZDATE.
We have another time characteristic Fiscal year / period (0FISCPER) which has single mandatory input variable for ex. 003.2011. This input variable is called ZFISCPER.
Now I have to write an ABAP-Code where the customer exit variable ZDATE is derived (fiscal last year to last period) from input variable ZFISCPER in INCLUDE ZXRSRU01.
Means when the input variable (ZFISCPER) is 003.2011 then the customer exit variable ZDATE should be calculated in INCLUDE ZXRSRU01 as 01.01.2010 u2013 28.02.2011 (fiscal last year to last period).
Since I am quite new in ABAP, I will be grateful if you could write me sample ABAP for this.
Many thanks.Hi,
should be something like:
DATA: l_s_range TYPE rsr_s_rangesid,
input LIKE sy-datum.
When 'ZDATE'
CONCATENATE '0101' 0FISCPER+3(4)-1 into l_s_range-low. "You get 01012010
CONCATENATE '01' Fiscper+1(6) into input. "You get 01032011
l_s_range-high = input-1. "You get 28022011
APPEND l_s_range TO e_t_range.
Greetings
Roman -
T Code for Viewing Customer Deliveries by Warehouse?
Hello All,
I am trying to find out if there is a Transaction Code which will list a specific region's customers by Warehouse. We do not have any PA reports. In its absence, I am trying to see if I could run any transaction code where I can put in warehouse and ask it to show shipments to customers in a specific profit center.
Not sure if there is anything like that but I thought I would ask. Any tips is appreciated.
Regards,
Sam.Hi,
For your requirement, there may exist a few possibilities. You can try any of them.
a. Check if VA05 transaction works for you. Basically VA05 gives you the open orders for the customer... I think the region and plant are already present. In case they are not, then, In some of the previous posts on SDN I saw that a few sap notes (Note 350068) can be applied to VA05 to get some of the required fields. You can try that to get your desired result.
Check this link Re: Delivery report
b. You can try out creating the SAP Query. Tcodes: SQ01, SQ02 and SQ03. If you are not a technical guy, then take help of an ABAPer who can help you out with it. Bascially you need to join the tables to get the desired result. For your requirement, I think you need to join table VBAK, VBPA, VBAP.
c. The third option is to develop a customer report using the tables VBAK, VBAP, VBPA and other tables if necessary.
Hope this answeres your query.
Thanks
Mukund S
Edited by: MukundHS on Aug 28, 2010 10:01 PM -
How and where to define Char Value for Industry code for the customer
Hi All,
How to define and where to derfine Characteristic value for Industry code (KNA1-BRAN1) field
for a Customer.
As while PGI I am getting error message that Characteristic value for Industry code 00008
does not exist.
RishiSolved
-
Any BAPI/Function Module for adding new record with dates in PA0027
Hi all,
I am tryig to find is there any BAPI/Function module for updating new record with Start Date and End date for specified Personal Number in PA0027 Table.
In PA0027 table i will be passing start date and end date for selected personal number, it needs to add new record with this details in the table checking the condition that this start date and end dates should not be between any of of start date and end dates for the specified personal number.
thanks for ur time.
MuraliHi Raj/Suresh thanks for ur answers.
but i am having a problem,i gave this values.
INFTY -
0027
NUMBER -
00000010
SUBTYPE -
010
OBJECTID
LOCKINDICATOR
VALIDITYEND -
03/12/2006
VALIDITYBEGIN -
03/01/2006
RECORDNUMBER -
000
RECORD -
P0027
OPERATION -
CHK
TCLAS -
A
DIALOG_MODE -
0
NOCOMMIT -
Y
VIEW_IDENTIFIER
SECONDARY_RECORD
i am getting short dump saying that
The source field is too short.
The current program, "SAPLHRMM", tried to assign a field to a field symbo
However, the field is shorter than the type of the field symbol, which
is not allowed.
The statement in question is in the form ASSIGN f TO <fs> CASTING or
ASSIGN f TO <fs> with a field symbol that was created using the
STRUCTURE addition.
I tried operation - Chage,Create (same thing for all inputs)
is this correct funtion moduel for my requirment?
what ever i am passing the start and end dates this should check in the table records with this personal number and if this start date and end dates are not between of any start and end dates then it should add new record with this dates.
Thanks for ur time.
Murali. -
BDC OK CODE FOR ENTER NOT RECORDING
I m creating a BDC Programme for uploading OLD PO date from excel to SAP System.
All PO's are Service PO.
PO's date and Delivery Date is in back date.
My programme working fine.
But i have to press enter manually due to PO Date = back date and Delivery date is also back date.
SHDB unable to record this event.
How to record this event.
Is there any way to disable system messages during BDC Programme.
When I press enter two times my programme runs very well.
Kindly help me.
Its very much urgent.
Code is give below.
REPORT zbdcme21n
NO STANDARD PAGE HEADING LINE-SIZE 255.
DATA : l_file TYPE rlgrap-filename.
DATA: e_group_opened.
PARAMETERS session RADIOBUTTON GROUP ctu. "create session
*DATA : session RADIOBUTTON GROUP ctu.
DATA : group(12). "group name of session
group = 'BDC'.
*PARAMETERS: user(12) DEFAULT sy-uname. "user for session in batch
DATA : user(12).
user = sy-uname.
*DATA : keep AS CHECKBOX. "' ' = delete session if finished
DATA : keep TYPE checkbox.
keep = 'X'.
*PARAMETERS: holddate LIKE sy-datum. "'X' = keep session if finished
DATA : holddate LIKE sy-datum.
holddate = sy-datum.
PARAMETERS ctu RADIOBUTTON GROUP ctu. "call transaction
DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
DATA : BEGIN OF i_tab OCCURS 0, "excel data stored in this file.
row TYPE alsmex_tabline-row,
col TYPE alsmex_tabline-col,
value TYPE alsmex_tabline-value,
END OF i_tab.
DATA : BEGIN OF wa_line1 OCCURS 0, "excel data stored in this file.
row TYPE alsmex_tabline-row,
col TYPE alsmex_tabline-col,
value TYPE alsmex_tabline-value,
srno TYPE i,
END OF wa_line1.
DATA : wa_line2 LIKE wa_line1 OCCURS 0 WITH HEADER LINE .
DATA : wa_hdr1 LIKE wa_line1 OCCURS 0 WITH HEADER LINE .
DATA : wa_hdr LIKE i_tab OCCURS 0 WITH HEADER LINE .
DATA : wa_line LIKE i_tab OCCURS 0 WITH HEADER LINE .
DATA : w_cnt TYPE i . "store total no of pos
DATA : w_hdr_counter VALUE 1. "for header line count
DATA : w_line_counter VALUE 1. "for Line Item Counter.
w_cnt = 0.
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
PARAMETER: dataset TYPE rlgrap-filename OBLIGATORY.
SELECTION-SCREEN: END OF BLOCK b1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR dataset.
PERFORM upload_file.
*include bdcrecx1.
START-OF-SELECTION.
PERFORM process_itab.
*include bdcrecx1.
START-OF-SELECTION.
PERFORM open_group.
**********************start for header
w_hdr_counter = 1.
WHILE w_hdr_counter <= w_cnt.
PERFORM bdc_dynpro USING 'SAPMM06E' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RM06E-BEDAT'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
READ TABLE wa_hdr1 WITH KEY col = 2 srno = w_hdr_counter.
PERFORM bdc_field USING 'EKKO-LIFNR'
wa_hdr1-value. "'800000'.
READ TABLE wa_hdr1 WITH KEY col = 3 srno = w_hdr_counter.
PERFORM bdc_field USING 'RM06E-BSART'
wa_hdr1-value. "'ZS'.
READ TABLE wa_hdr1 WITH KEY col = 4 srno = w_hdr_counter.
PERFORM bdc_field USING 'RM06E-BEDAT'
wa_hdr1-value. " '14.01.2008'.
PERFORM bdc_field USING 'RM06E-LPEIN'
'T'.
READ TABLE wa_hdr1 WITH KEY col = 13 srno = w_hdr_counter.
PERFORM bdc_field USING 'RM06E-EEIND'
wa_hdr1-value. "'14.01.2008'. "Delivery Date
PERFORM bdc_field USING 'RM06E-LPEIN'
'T'.
READ TABLE wa_hdr1 WITH KEY col = 6 srno = w_hdr_counter.
PERFORM bdc_field USING 'EKKO-EKORG'
wa_hdr1-value. "'serv'.
READ TABLE wa_hdr1 WITH KEY col = 7 srno = w_hdr_counter.
PERFORM bdc_field USING 'EKKO-EKGRP'
wa_hdr1-value. "'dce'. Purchase Group
READ TABLE wa_hdr1 WITH KEY col = 8 srno = w_hdr_counter.
PERFORM bdc_field USING 'RM06E-EPSTP'
wa_hdr1-value. "'d'. Item Category
READ TABLE wa_hdr1 WITH KEY col = 9 srno = w_hdr_counter.
PERFORM bdc_field USING 'RM06E-KNTTP'
wa_hdr1-value. "'p'. Account Asign Category
READ TABLE wa_hdr1 WITH KEY col = 10 srno = w_hdr_counter.
PERFORM bdc_field USING 'RM06E-WERKS'
wa_hdr1-value. "'1001'.Plant
READ TABLE wa_hdr1 WITH KEY col = 11 srno = w_hdr_counter.
PERFORM bdc_field USING 'RM06E-LGORT'
wa_hdr1-value. " '1101'. Store Location
READ TABLE wa_hdr1 WITH KEY col = 12 srno = w_hdr_counter.
PERFORM bdc_field USING 'RM06E-MATKL'
wa_hdr1-value. "'c003'. Material Group
PERFORM bdc_dynpro USING 'SAPLMLSP' '0200'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
********************end of Header Data*******************
data i type n value 1.
data bfield type string.
LOOP AT wa_line1 WHERE col = 1 AND srno = wa_hdr1-srno.
READ TABLE wa_line2 WITH KEY COL = 14 SRNO = wa_hdr1-srno ROW = wa_line1-ROW.
PERFORM bdc_field USING 'RM11P-HEADTEXT'
wa_line2-value. " 'Earthwork text'.
concatenate 'ESLL-SRVPOS(' i ')' into bfield.
PERFORM bdc_field USING 'BDC_CURSOR'
bfield. " 'ESLL-SRVPOS(01)'. "increase counter
PERFORM bdc_field USING 'RM11P-NEW_ROW'
'10'.
READ TABLE wa_line2 WITH KEY COL = 15 SRNO = wa_hdr1-srno ROW = wa_line1-ROW.
PERFORM bdc_field USING bfield "'ESLL-SRVPOS(01)'
wa_line2-value. "'5000000000'.
concatenate 'ESLL-MENGE(' i ')' into bfield.
READ TABLE wa_line2 WITH KEY COL = 16 SRNO = wa_hdr1-srno ROW = wa_line1-ROW.
PERFORM bdc_field USING bfield "'ESLL-MENGE(01)' "qty
wa_line2-value. "'15'.
concatenate 'ESLL-MEINS(' i ')' into bfield.
READ TABLE wa_line2 WITH KEY COL = 17 SRNO = wa_hdr1-srno ROW = wa_line1-ROW.
PERFORM bdc_field USING bfield "'ESLL-MEINS(01)'
wa_line2-value. "'ft3'.
concatenate 'ESLL-TBTWR(' i ')' into bfield.
READ TABLE wa_line2 WITH KEY COL = 18 SRNO = wa_hdr1-srno ROW = wa_line1-ROW.
PERFORM bdc_field USING bfield " 'ESLL-TBTWR(01)'
wa_line2-value. "'150'.
PERFORM bdc_field USING 'BDC_OKCODE' "Manually added
'/00'.
PERFORM bdc_dynpro USING 'SAPLMLSK' '0200'.
concatenate 'ESKN-PS_PSP_PNR' i ')' into bfield.
PERFORM bdc_field USING 'BDC_CURSOR'
'ESKN-PS_PSP_PNR(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'VRTKZ1'
'X'.
concatenate 'ESKN-SAKTO(' i ')' into bfield.
READ TABLE wa_line2 WITH KEY COL = 19 SRNO = wa_hdr1-srno ROW = wa_line1-ROW.
PERFORM bdc_field USING 'ESKN-SAKTO(01)' "GL Account No.
wa_line2-value. " '6010010'.
concatenate 'ESKN-PS_PSP_PNR(' i ')' into bfield.
READ TABLE wa_line2 WITH KEY COL = 20 SRNO = wa_hdr1-srno ROW = wa_line1-ROW.
PERFORM bdc_field USING 'ESKN-PS_PSP_PNR(01)'
wa_line2-value. " 'HR/KMP-KU'. "WBS Element
PERFORM bdc_dynpro USING 'SAPLMLSK' '0200'.
PERFORM bdc_field USING 'BDC_CURSOR'
'ESLL-INTROW'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BACK'.
PERFORM bdc_field USING 'VRTKZ1'
'X'.
PERFORM bdc_dynpro USING 'SAPLMLSP' '0200'.
i = i + 1.
ENDLOOP.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BACK'.
PERFORM bdc_field USING 'VRTKZ1'
'X'.
PERFORM bdc_dynpro USING 'SAPLMLSP' '0200'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
*perform bdc_field using 'RM11P-HEADTEXT'
'Earthwork text'.
*perform bdc_field using 'BDC_CURSOR' "Start Service Line 2
'ESLL-SRVPOS(02)'.
*perform bdc_field using 'RM11P-NEW_ROW'
'10'.
*perform bdc_field using 'ESLL-SRVPOS(02)'
'5000000006'.
*perform bdc_field using 'ESLL-MENGE(02)'
'10'.
*perform bdc_field using 'ESLL-MEINS(02)'
'kmk'.
*perform bdc_field using 'ESLL-TBTWR(02)'
'500'.
*perform bdc_dynpro using 'SAPLMLSK' '0200'.
*perform bdc_field using 'BDC_CURSOR'
'ESLL-INTROW'.
*perform bdc_field using 'BDC_OKCODE'
'/00'.
*perform bdc_field using 'VRTKZ1'
'X'.
*perform bdc_dynpro using 'SAPLMLSK' '0200'.
*perform bdc_field using 'BDC_CURSOR'
'ESKN-PS_PSP_PNR(01)'.
*perform bdc_field using 'BDC_OKCODE'
'/00'.
*perform bdc_field using 'VRTKZ1'
'X'.
*perform bdc_field using 'ESKN-SAKTO(01)'
'6010010'.
*perform bdc_field using 'ESKN-PS_PSP_PNR(01)'
'HR/KMP-KU'.
*perform bdc_dynpro using 'SAPLMLSK' '0200'.
*perform bdc_field using 'BDC_CURSOR'
'ESLL-INTROW'.
*perform bdc_field using 'BDC_OKCODE'
'=BACK'.
*perform bdc_field using 'VRTKZ1'
'X'.
*perform bdc_dynpro using 'SAPLMLSP' '0200'.
*perform bdc_field using 'BDC_OKCODE'
'/00'.
*perform bdc_field using 'RM11P-HEADTEXT'
'Earthwork text'.
*perform bdc_field using 'BDC_CURSOR'
'ESLL-KTEXT1(01)'.
*perform bdc_field using 'RM11P-NEW_ROW'
'10'.
*perform bdc_dynpro using 'SAPLMLSP' '0200'.
*perform bdc_field using 'BDC_OKCODE'
'=ESB'.
*perform bdc_field using 'RM11P-HEADTEXT'
'Earthwork text'.
*perform bdc_field using 'BDC_CURSOR'
'ESLL-KTEXT1(01)'.
*perform bdc_field using 'RM11P-NEW_ROW'
'10'.
*perform bdc_dynpro using 'SAPMM06E' '0120'.
*perform bdc_field using 'BDC_CURSOR'
'RM06E-EBELP'.
*perform bdc_field using 'BDC_OKCODE'
'=MALL'.
*perform bdc_field using 'RM06E-EBELP'
'10'.
PERFORM bdc_dynpro USING 'SAPMM06E' '0120'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RM06E-EBELP'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=KOPF'.
PERFORM bdc_field USING 'RM06E-EBELP'
'10'.
PERFORM bdc_dynpro USING 'SAPMM06E' '0101'.
PERFORM bdc_field USING 'BDC_CURSOR'
'EKKO-EKGRP'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=TXK'.
*perform bdc_field using 'EKKO-EKGRP'
'DCE'.
*perform bdc_field using 'EKKO-PINCR'
'10'.
*perform bdc_field using 'EKKO-UPINC'
'1'.
*perform bdc_field using 'EKKO-WAERS'
'INR'.
*perform bdc_field using 'EKKO-WKURS'
' 1.00000'.
PERFORM bdc_dynpro USING 'SAPMM06E' '0103'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RM06E-LTEX1(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BU'.
PERFORM bdc_field USING 'RM06E-LTEX1(01)'
'Old PO no.'.
*perform bdc_transaction using 'ME21'.
w_hdr_counter = w_hdr_counter + 1.
ENDWHILE.
CALL TRANSACTION 'ME21' USING bdcdata MODE 'A'.
PERFORM close_group.
***************forms************
FORM upload_file.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
*def_filename = ' '
*def_path = ' '
*mask = ' '
mode = '0'
title = 'Choose the Appropriate excel sheet for service PO upload'
IMPORTING
filename = dataset
*EXCEPTIONS
*inv_winsys = 01
*no_batch = 02
*selection_cancel = 03
*selection_error = 04
l_file = dataset.
PERFORM read_exceldata.
ENDFORM. "UPLOAD_FILE
*& Form READ_EXCELDATA
text
FORM read_exceldata.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = l_file
i_begin_col = 1
i_begin_row = 2
i_end_col = 25
i_end_row = 4
TABLES
intern = i_tab
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3
ENDFORM. "READ_EXCELDATA
create batchinput session *
(not for call transaction using...) *
FORM open_group.
IF session = 'X'.
SKIP.
WRITE: /(20) 'Create group'(i01), group.
SKIP.
open batchinput group
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
client = sy-mandt
group = group
user = user
keep = keep
holddate = holddate.
WRITE: /(30) 'BDC_OPEN_GROUP'(i02),
(12) 'returncode:'(i05),
sy-subrc.
ENDIF.
ENDFORM. "OPEN_GROUP
end batchinput session *
(call transaction using...: error session) *
FORM close_group.
IF session = 'X'.
close batchinput group
CALL FUNCTION 'BDC_CLOSE_GROUP'.
WRITE: /(30) 'BDC_CLOSE_GROUP'(i04),
(12) 'returncode:'(i05),
sy-subrc.
ELSE.
IF e_group_opened = 'X'.
CALL FUNCTION 'BDC_CLOSE_GROUP'.
WRITE: /.
WRITE: /(30) 'Fehlermappe wurde erzeugt'(i06).
e_group_opened = ' '.
ENDIF.
ENDIF.
ENDFORM. "CLOSE_GROUP
*& Form BDC_DYNPRO
text
-->PROGRAM text
-->DYNPRO text
FORM bdc_dynpro USING program dynpro.
CLEAR bdcdata.
bdcdata-program = program.
bdcdata-dynpro = dynpro.
bdcdata-dynbegin = 'X'.
APPEND bdcdata.
ENDFORM. "BDC_DYNPRO
****bdc field************
FORM bdc_field USING fnam fval.
IF FVAL <> NODATA.
CLEAR bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
APPEND bdcdata.
ENDIF.
ENDFORM. "BDC_FIELD
FORM process_itab.
APPEND LINES OF i_tab TO wa_hdr .
DELETE wa_hdr WHERE col > 13 .
APPEND LINES OF i_tab TO wa_line .
DELETE wa_line WHERE col <> 1 AND col < 14 .
DATA : w_sr TYPE i.
w_sr = 0.
LOOP AT wa_hdr.
IF wa_hdr-col = 1.
w_sr = wa_hdr-value.
ENDIF.
wa_hdr1-row = wa_hdr-row.
wa_hdr1-col = wa_hdr-col.
wa_hdr1-value = wa_hdr-value.
wa_hdr1-srno = w_sr.
APPEND wa_hdr1.
w_cnt = wa_hdr-row.
ENDLOOP.
w_sr = 0.
LOOP AT wa_line.
IF wa_line-col = 1.
w_sr = wa_line-value.
ENDIF.
wa_line1-row = wa_line-row.
wa_line1-col = wa_line-col.
wa_line1-value = wa_line-value.
wa_line1-srno = w_sr.
APPEND wa_line1.
ENDLOOP.
w_sr = 0.
CLEAR wa_line2.
LOOP AT wa_line1.
wa_line2-row = wa_line1-row.
wa_line2-col = wa_line1-col.
wa_line2-value = wa_line1-value.
wa_line2-srno = wa_line1-srno.
APPEND wa_line2.
ENDLOOP.
ENDFORM. "PROCESS_ITAB
***************forms************Hi Pradeep
I find there is a problem in your code
When ever you use
PERFORM bdc_field USING 'BDC_OKCODE'
you should follow it up with
PERFORM bdc_dynpro USING <prg name> <screen number>
Please find code below with changes from a part of your code
PERFORM bdc_field USING 'RM06E-MATKL'
wa_hdr1-value. "'c003'. Material Group
* comment this statement is not needed now.
* PERFORM bdc_dynpro USING 'SAPLMLSP' '0200'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
READ TABLE wa_line2 WITH KEY COL = 14 SRNO = wa_hdr1-srno ROW = wa_line1-ROW.
* Put the bdc_dynpro for the prg name and screen number (I might be wrong with prg name and
* Screen number
PERFORM bdc_dynpro USING 'SAPLMLSK' '0200'.
Reward points as this will definitely help you
Edited by: Sriram Chandran on Mar 15, 2008 4:39 PM -
Cutom T-Code for seding customer details thru IDoc Debmas
Hi Experts,
I have a requirment where in.. I need to send customer details thru IDoc from a custom screen which has cutomer text box and a submit button. After entering cutomer and clicking on submit debmas06 Idoc has to be triggered.
I am not an ABAP expert... please help me with process on devloping the above reqirment.
This is a critical requirment please help ASAP.
Thanks,
SumaHi,
u have to use standalone program..iam giving one sample code..aong with u have define the RFC (SM59,WE21(Create port),WE20(create partner profile,BD64 distribute model view)...u have to do..
when u press on submit button,,,
*& Report ZZ_Program_To_Create_Idoc
report zz_program_to_create_idoc .
tables: ekko,ekpo.
selection-screen skip 3.
selection-screen begin of block b1 with frame title titl.
selection-screen skip.
select-options s_ebeln for ekko-ebeln.
selection-screen skip.
selection-screen end of block b1.
data: header_segment_name like edidd-segnam value 'Z1EKKO',
item_segment_name like edidd-segnam value 'Z1EKPO',
idoc_name like edidc-idoctp value 'Z19838IDOC1'.
data: header_segment_data like z1ekko,
item_segment_data like z1ekpo.
data: control_record like edidc.
data: messagetyp like edmsg-msgtyp value 'ZZ9838MESG1'.
data: i_communication like edidc occurs 0 with header line,
i_data like edidd occurs 0 with header line.
data: begin of i_ekko occurs 0,
ebeln like ekko-ebeln,
aedat like ekko-aedat,
bukrs like ekko-bukrs,
bsart like ekko-bsart,
lifnr like ekko-lifnr,
end of i_ekko.
data: begin of i_ekpo occurs 0,
ebelp like ekpo-ebelp,
matnr like ekpo-matnr,
menge like ekpo-menge,
meins like ekpo-meins,
netpr like ekpo-netpr,
end of i_ekpo.
start-of-selection.
select ebeln aedat bukrs bsart lifnr from ekko
into table i_ekko where ebeln in s_ebeln.
select ebelp
matnr
menge
meins
netpr
from ekpo
into table i_ekpo
where ebeln in s_ebeln.
control_record-mestyp = messagetyp.
control_record-rcvprt = 'LS'.
control_record-idoctp = idoc_name.
control_record-rcvprn = '0MART800'.
loop at i_ekko.
header_segment_data-ebeln = i_ekko-ebeln.
header_segment_data-aedat = i_ekko-aedat.
header_segment_data-bukrs = i_ekko-bukrs.
header_segment_data-bsart = i_ekko-bsart.
header_segment_data-lifnr = i_ekko-lifnr.
i_data-segnam = header_segment_name.
i_data-sdata = header_segment_data.
append i_data.
select ebelp
matnr
menge
meins
netpr
from ekpo
into table i_ekpo
where ebeln = i_ekko-ebeln.
loop at i_ekpo.
item_segment_data-ebelp = i_ekpo-ebelp.
item_segment_data-matnr = i_ekpo-matnr.
item_segment_data-menge = i_ekpo-menge.
item_segment_data-meins = i_ekpo-meins.
item_segment_data-netpr = i_ekpo-netpr.
i_data-segnam = item_segment_name.
i_data-sdata = item_segment_data.
append i_data.
endloop.
clear i_ekpo.
refresh i_ekpo.
endloop.
call function 'MASTER_IDOC_DISTRIBUTE'
exporting
master_idoc_control = control_record
OBJ_TYPE = ''
CHNUM = ''
tables
communication_idoc_control = i_communication
master_idoc_data = i_data
exceptions
error_in_idoc_control = 1
error_writing_idoc_status = 2
error_in_idoc_data = 3
sending_logical_system_unknown = 4
others = 5
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
else.
loop at i_communication.
write: 'IDOC GENERATED', i_communication-docnum.
endloop.
commit work.
endif.
initialization.
titl = 'ENTER THE PURCHASE ORDER NUMBER'.
Regards,
Nagaraj -
Screen exit/BADI for adding custom field in IW31/IW32
Hi all,
The requirement is to add the permit field in the Header component of IW31. Searched SDN and found user exit IWO10018 for the same which includes a screen exit.
The activation of the same is adding a tab in the screen while user wants the field under header Component tab.
How this can be done. Any suggestion.
Thanks
anyaHi,
You can perform append structure to add your custom field(s)in VBAP table. Next step, go to SE51 (Screen Painter)to modify SAP Program SAPMV45A Screen number 4459 for Additional data A or Screen number 8459 for Additional data B to add your append structure custom fields.
Once the above steps done, you can place your logic to populate custom fields in include program MV45AFZZ. i.e USEREXIT_MOVE_FIELD_TO_VBAP.
At the end, please ensure all program and screen are activated. Hope this will help.
Regards
Kiran Sure -
XRPM: Need to find the BADI for adding custom fields to master data
Hi,
We have activated XRPM(4.0) business content and need to add some custom fields to some of the master data ( for example need to add custom fields to master data info object 0RPM_IHGU, 0RPM_IGCG etc).
We have enhanced the data sources ( 0RPM_ITEM_HEADER_GUID_ATTR and 0RPM_FIN_CAT_GUID_ATTR respectively) in the source system by appending additional fields to the append structure of the data source We are trying to find the BADI where we can implement the custom code.
Can anybody help to find the particular BADI, id there one for all master data carrying data source in the xRPM source system?
ThanksDear Arunava,
1) In your R3 goto SE16 --> open table ROOSOURCE.
Search for your OLTP source...eg: 0RPM*
The column EXTRACTOR will give you the module name.
2) Also look/follow the link:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9f668696-0701-0010-22be-a278e4587b68
Currently available BAdIs include:
RPM_BUPA_CUST_FIELDS BUPA customer fields
RPM_CALC_BUPA_BPFTE Calculate the business partner availability
RPM_CALC_STAFF_ICON calculate the staffing icon
RPM_CREATEUSR_NAME Generates user names
RPM_HR_IN_IF001 Customer exit for inbound time processing
RPM_HR_IN_IF002
RPM_HR_IN_IF003
RPM_HR_IN_IF004
RPM_HR_IN_IF005
RPM_HR_IN_IF006
RPM_INTEGRATION_OPTS get and set the project integration options
/RPM/OBJECT_SERVICES Object support services
/RPM/PERSON_CUST_FLD Resource customer fields
RPM_PROCESS_DATA Inbound processing of time data by customer
Good Luck, BB -
T-Code for Rebate Condition Record
Hi,
Can someone help me with this. I need to create a condition record for Rebate Condition type. Please give me the T-Code to create the Condition Record for Rebate condition type. Cause I am unable to create this thru VK11.
Thanks,
SumitHi
First search in the forum regarding rebate agreements. The same as been answered so many times in the forum.
For this you need to create a rebate agreement for the customers
Goto T code VBO1
enter the rebate agreement type as per your requirement BO01 or BO03
there in the screen enter the rebate recepient now from the menu press "CONDITIONS" tab
there you can enter the condition records
regards -
Too much time taken for Adding/Updating records in netscape LDAP
Hi,
I am a newbie in ldap and have a text file with 80,000 users information in it, which i need to add into LDAP.
I am using netscape LDAP 5.1 as my directory server.
The time that is being taken to add records into LDAP, is like 3 minutes for each add.
This is slowing down my batch job terribly, and causing issues with performance.
Does anybody have a idea or knowledge whether this is correct or things could be speeded up, if yes a few pointers and tips would be highly appreciated.
Thanks in advance
piyush_ast.I don't really have any suggestions for the speed, other then to make the code or network connnectivity more efficient if possible. Maybe you should read the Netscape documentation. However, perhaps LDAP isn't the best solution for you. LDAP is optimized for a read-often, write-rarely, type of setup. If you're constantly updating such a large volume of records, maybe a DB would be the best choice.
Maybe you are looking for
-
IMac, Multiple Monitors & Spaces
I have 2 monitors connected to my new iMac. I arrange various setups using Spaces on all 3 monitors. When the iMac comes out of sleep mode, all of the panels are always pulled into the iMac monitor (e.g. the other monitors are empty) in each Space.
-
Speeding up loading of gui applications
Hi there I would like to optimise a gui application, is it posible to have all the required componants stored in a jar hence speeding up the gui construction time, or what othere techniques can one adopt to speed this up. also I noticed that the syst
-
How can I open a winmail.dat on my macbook pro, I have already downloaded the letter opener for winmail but it doesn;'t open the file?
-
Common Transport Directory Migration
Our ERP 6.0 system is running on Windows 2003 Server 64 bit. The default install created a separate transport directory on each CI host. As a result users do not have log information of their transports into the PROD system, from the DEV or QAS syste
-
PSE 11 Runtime Error R6034 "An application has made an attempt to load the C runtime library incorrectly." I just start getting this message when starting up Win 7 Ultimate 64 bit laptop! In researching the error I found it to be caused by PSE 11.