Report to report interace ( Need to drill down to Sales Order Transaction )
Hi,
Report to report interface is working fine when I am jumping from Cube to ODS( Example Sales Order item). However now I want to jump from the ODS data in a query ( Sales order level) to the transaction system and want to view the sales order detail info
What I did is define a REPORT TO REPORT interface in the BW from the from the 2nd query and defined the interface as the following
Report type : Transaction
Target system : choose the CRM system from the drop down
Report : CRMD_BUS2000121 ( as this is the transaction for sales order).
The whole thing works fine and the transaction opens. But the way the transaction works is that you will need to go to the menu and then Open and put the Sales order number and can only display after that. This is not very user friendly and I want the user to directly launch the sales order transaction in display mode.. from BW.. Is it possible?
Thanks
Arunava
hi Anurava,
take a look this doc, if you haven't
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/6eb89190-0201-0010-89bf-ad46d1503ef9
as Ashish mentioned you need to maintain the 'detail' assignment, choose infosource '0crm_sales_order_i (i guess for your case), choose 'field table' for type, and field possibly OBJECT_ID or CRMT_OBJECT_ID ... you may get the field info by go to crm system, position on cursor the info and F1 ....
Special cases: For most transactions sender-receiver assignments function without you having to make further specifications. However, it is necessary for some transactions to make detailled assignments. One reason for this may be that the transaction uses an unseen first screen and the parameter is not filled by the memory ID of the data element. After having created the sender-receiver assignment as described above, proceed as follows: ...
1. Select your sender-receiver assignment ans choose Assignment Details.
2. Select Table Field as the type. You are then able to make entries in the Field Name, Data Elements, Domains and Set/Get Parameter columns.
3. Specify the field name, data element, domain, and parameter ID for the receiver transaction.
You need to know this information as no input help is available. You can normally find the parameter ID in the ABAP Dictionary under data elements. If it is still not possible to jump to the transaction, it may be necessary to program a short ABAP start program. Read SAP Note 383077 (RRI: Transaction call unsuccessful) on this
Similar Messages
-
Error using drill down function on receiving transaction in GL
"The Receiving Accounting Events function is not available under General Ledger Super User" is received when attempting to drill down on a receiving transaction through GL. I have searched for any missing roles/responsibilities under GL super user and attempted the same process with GL Manager and sysadmin roles without success.
Please see these docs.
GL Drilldown for SLA Transactions for Period End Accrual Error: Receiving Accounting Events Function & FRM-40010 CSTFQRAE [ID 1289612.1]
The Receiving Accounting Events function is not available under the General Ledger Super User responsibility. [ID 1318147.1]
Cannot Drilldown to GL Account Details For Cost Management Source - 'No Available Transaction for this Line' [ID 1316330.1]
Thanks,
Hussein -
Urgent!!!Need code to fetch all sales order data and download to flat file
urgent!!!Need code to fetch all sales order data and download to flat file
D A T A B A S E T A B L E S *
TABLES: vbak, "Sales Document: Header Data
VBAP, "Sales Document: Item Data
MARA,VAPMA,VBPA,VBLB,VBEP,
VBKD. "Murali Poli .
I N T E R N A L T A B L E S *
Internal table to hold the Delphi material numbers file
DATA: BEGIN OF tbl_matnr OCCURS 0,
matnr LIKE mara-matnr, "Material number
END OF tbl_matnr.
Internal table to hold customer cross ref data
DATA: BEGIN OF TBL_CUST_SA OCCURS 0,
OLD_KUNNR LIKE KNA1-KUNNR, "Old Customer
OLD_VKORG LIKE A004-VKORG, "Old Sales organisation
OLD_VTWEG LIKE A004-VTWEG, "Old Distribution channel
NEW_KUNNR LIKE KNA1-KUNNR, "New Customer
NEW_VKORG LIKE A004-VKORG, "New Sales organisation
NEW_VTWEG LIKE A004-VTWEG, "New Distribution channel
PARVW LIKE VBPA-PARVW , "Partner function
END OF TBL_CUST_SA.
Internal table to check the material numbers of the input file
DATA: tbl_mara LIKE tbl_matnr OCCURS 0 WITH HEADER LINE.
Work area to hold the header record
DATA: BEGIN OF w_sa_header,
recordtype(1), "Record type
schedulingagreement(4), "SA Type
contractreference(10), "Contract Reference
salesorg(4), "Sales Organization
distrchannel(2), "Distribution channel
division(2), "Sales division
PONUMBER(35), "Purchase order number"gsbhondave
soldtoparty(12), "Sold-to party
shiptoparty(12), "Ship-to party
collectivenumber(10), "Collective number
description(40), "Description
roundqty(13), "Rounding Qty
pdsi(4), "PDI
correctiondeliverydate(8), "Correction Delivery Dt
correctionqty(13), "Correction Qty
cumulativereceivedqty(13), "Cumulative Received Qty
forecastdeliveryschedule(17), "Forecast Delivery Schedule
forecastdelscheddate(8), "Forecast Delivery Schedule Dt
jitdeliveryschedule(17), "JIT Delivery Schedule
jitdeliveryscheduledate(8), "JIT Delivery Schedule Dt
materialnumber(18), "Material number
plant(4), "Plant
item_category(4), "Item Category
suppliercode(15), "Supplier code
scac(4), "SCAC
deloc(12), "DELOC
pkg_id(12), "Packaging ID
catno(30), "Ultimate Cust Part
lgort(4), "Storage Location
vstel(4), "Shipping point
Adding fields by Murali Poli
VSBED(2), "Shipping conditions
INCO1(3), "Incoterms (part 1)
INCO2(28), "Incoterms (part 2)
ZECN(1), "Engineering Change Letter
End of Adding fields by Murali Poli
END OF w_sa_header.
Work area to hold the forecast record
DATA: BEGIN OF w_sa_forecast,
recordtype(1), "Record Type
dateformat(1), "Date format
forecastdate(8), "Forecast date
forecastorderqty(13), "Order Qty
END OF w_sa_forecast.
Work area to hold the jit record
DATA: BEGIN OF w_sa_jit,
recordtype(1), "Record Type
dateformat(1), "Date format
jitdate(8), "JIT date
jittime(6), "JIT Time
jitorderqty(13), "Order Qty
END OF w_sa_jit.
Internal table to hold the Extracted data
DATA: BEGIN OF tbl_record OCCURS 0,
record_type,
DATA(400), " changed from 325 to 400
END OF tbl_record.
Internal table to capture the errors
DATA: BEGIN OF tbl_error OCCURS 0,
error_text(135),
END OF tbl_error.
Internal table to hold the records of VBAP_VAPMA
DATA: BEGIN OF tbl_vbap_vapma OCCURS 0,
VBELN LIKE VAPMA-VBELN, "Sales and distribution document number
POSNR LIKE VAPMA-POSNR, "Item number
AUART LIKE VAPMA-AUART, "SA Type
VKORG LIKE VAPMA-VKORG, "Sales Organization
VTWEG LIKE VAPMA-VTWEG, "Distribution channel
SPART LIKE VAPMA-SPART, "Division
KUNNR LIKE VAPMA-KUNNR, "Sold-to
plavo like vbap-plavo, "PDI
MATNR LIKE VAPMA-MATNR, "Material number
WERKS LIKE VAPMA-WERKS, "Plant
TRVOG LIKE VAPMA-TRVOG, "Transaction group
VBTYP LIKE VBAK-VBTYP, "SD document category "Murali Poli
VSBED LIKE VBAK-VSBED, "Shipping conditions "Murali Poli
BSTNK LIKE VBAK-BSTNK, " Purchase order number " gsbhondave
KTEXT LIKE VBAK-KTEXT,
VGBEL LIKE VBAP-VGBEL, "Reference document no
ABLFZ LIKE VBAP-ABLFZ, "Rounding qty
PSTYV LIKE VBAP-PSTYV, "Item category
LGORT LIKE VBAP-LGORT, "Storage location
VSTEL LIKE VBAP-VSTEL, "Shipping point
END OF TBL_VBAP_VAPMA.
DATA: BEGIN OF TBL_VBAP OCCURS 0,
VBELN LIKE VAPMA-VBELN,
POSNR LIKE VAPMA-POSNR,
VGBEL LIKE VBAP-VGBEL,
ABLFZ LIKE VBAP-ABLFZ,
PSTYV LIKE VBAP-PSTYV,
LGORT LIKE VBAP-LGORT,
VSTEL LIKE VBAP-VSTEL,
END OF TBL_VBAP.
Adding by Murali Poli
DATA:BEGIN OF TBL_VBKD OCCURS 0,
VBELN LIKE VBKD-VBELN,
POSNR LIKE VBKD-POSNR,
INCO1 LIKE VBKD-INCO1,
INCO2 LIKE VBKD-INCO2,
END OF TBL_VBKD.
End by Murali Poli
Internal table to hold temporarily the records of VBAP_VAPMA
DATA: tbl_vbap_vapma_temp LIKE tbl_vbap_vapma OCCURS 0 WITH HEADER LINE.
Internal table to hold the records of VBPA
DATA: BEGIN OF tbl_vbpa OCCURS 0,
vbeln LIKE vbpa-vbeln, "Sales and distribution
"document number
posnr LIKE vbpa-posnr, "Item number
parvw LIKE vbpa-parvw, "SP Partner type
kunnr LIKE vbpa-kunnr, "Customer number
lifnr LIKE vbpa-lifnr, "SCAC code "DN3K923909
END OF tbl_vbpa.
Internal table to hold the records of VBLB (Forecast)
DATA: BEGIN OF tbl_vblb_forecast OCCURS 0,
vbeln LIKE vblb-vbeln,
posnr LIKE vblb-posnr,
abart LIKE vblb-abart, "Release type
abefz LIKE vblb-abefz, "Cumulative Quantity
"Received by Customer
labnk LIKE vblb-labnk, "Delivery schedule
abrdt LIKE vblb-abrdt, "Deivery date
gjkun LIKE vblb-gjkun, "Current fiscal year
vjkun LIKE vblb-vjkun, "Previous fiscal year
END OF tbl_vblb_forecast.
Internal table to hold the records of VBLB (JIT)
DATA: BEGIN OF tbl_vblb_jit OCCURS 0,
vbeln LIKE vblb-vbeln,
posnr LIKE vblb-posnr,
abart LIKE vblb-abart, "Release type
abefz LIKE vblb-abefz, "Cumulative Quantity
"Received by Customer
labnk LIKE vblb-labnk, "Delivery schedule
abrdt LIKE vblb-abrdt, "Deivery date
gjkun LIKE vblb-gjkun, "Current fiscal year
vjkun LIKE vblb-vjkun, "Previous fiscal year
END OF tbl_vblb_jit.
Internal table to hold the Forecast Schedule lines
DATA: BEGIN OF tbl_vbep_forecast OCCURS 0,
vbeln LIKE vbep-vbeln, "Sales document
posnr LIKE vbep-posnr, "Item number
etenr LIKE vbep-etenr, "Schedule line
edatu LIKE vbep-edatu, "Schedule line date
ezeit LIKE vbep-ezeit, "Arrival time "DN3K923909
wmeng LIKE vbep-wmeng, "Order quantity in sales units
prgrs LIKE vbep-prgrs, "Date type (day, week, month, interval)
abart LIKE vbep-abart, "Release type "DN3K923909
END OF tbl_vbep_forecast.
Internal table to hold the JIT Schedule lines
DATA: BEGIN OF tbl_vbep_jit OCCURS 0,
vbeln LIKE vbep-vbeln, "Sales document
posnr LIKE vbep-posnr, "Item number
etenr LIKE vbep-etenr, "Schedule line
edatu LIKE vbep-edatu, "Schedule line date
ezeit LIKE vbep-ezeit, "Arrival time
wmeng LIKE vbep-wmeng, "Order quantity in sales units
prgrs LIKE vbep-prgrs, "Date type (day, week, month, interval)
abart LIKE vbep-abart, "Release type "DN3K923909
END OF tbl_vbep_jit.
Internal table for Long texts
DATA: tbl_tline LIKE tline OCCURS 0 WITH HEADER LINE.
V A R I A B L E S *
DATA: v_count TYPE i,
V_REPID LIKE SY-REPID,
w_eins LIKE vbap-umvkz VALUE 1,
v_cumulative_deli_qty LIKE vblb-abefz,
v_text_name LIKE thead-tdname,
v_week LIKE scal-week,
v_count_h TYPE i, "Count of header records
v_count_f TYPE i, "Count of Forecast records
v_count_j TYPE i, "Count of JIT records
v_count_t TYPE i. "Count of Shipping instructions
TYPES: unixfile LIKE rlgrap-filename,
unixdir LIKE rlgrap-filename.
DATA: v_file1 TYPE unixfile,
v_file2 TYPE unixfile.
DATA: tbl_dynpfields LIKE dynpread OCCURS 0 WITH HEADER LINE.
*data tbl_cust_sa.
S E L E C T - O P T I O N S / P A R A M E T E R S *
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
Valid-to date
PARAMETER:
p_gueen like vbak-gueen obligatory,
Correction Delivery date
P_DELDT LIKE VBAK-GUEEN OBLIGATORY.
Begin of Changes - TIR-40266
Plant
SELECT-OPTIONS: s_werks FOR vbap-werks.
*SD document category
SELECT-OPTIONS: S_VBTYP FOR VBAK-VBTYP OBLIGATORY." Murali Poli
Sales organization
SELECT-OPTIONS: S_VKORG FOR VBAK-VKORG OBLIGATORY.
End of Changes - TIR-40266
SELECTION-SCREEN SKIP 1.
PARAMETER: r1 RADIOBUTTON GROUP rg1.
Material numbers file
PARAMETER: P_FILE1 LIKE RLGRAP-FILENAME.
PARAMETER: P_FILE6 LIKE RLGRAP-FILENAME.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(32) text-003.
SELECTION-SCREEN POSITION 33.
SD SA Extract file
PARAMETER: P_FILE2 LIKE RLGRAP-FILENAME
DEFAULT 'C:\sd_sa_extract.txt'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP 2.
PARAMETER: r2 RADIOBUTTON GROUP rg1.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(32) text-004.
SELECTION-SCREEN POSITION 33.
PARAMETER: p_path1 TYPE unixdir OBLIGATORY DEFAULT '/tmp/'.
SELECTION-SCREEN END OF LINE.
Material numbers file
PARAMETER: PU_FILE1 LIKE RLGRAP-FILENAME.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(32) text-003.
SELECTION-SCREEN POSITION 33.
SD SA Extract file
PARAMETER: PU_FILE2 LIKE RLGRAP-FILENAME.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(64) text-005.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b1.
A T S E L E C T I O N S C R E E N E V E N T S *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
v_repid = syst-repid.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
program_name = v_repid
CHANGING
file_name = p_file1
EXCEPTIONS
mask_too_long = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE e009.
Message shown as 'Error while getting the file name'
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE6.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
program_name = v_repid
CHANGING
FILE_NAME = P_FILE6
EXCEPTIONS
mask_too_long = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE e009.
Message shown as 'Error while getting the file name'
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file2.
v_repid = syst-repid.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
program_name = v_repid
CHANGING
file_name = p_file2
EXCEPTIONS
mask_too_long = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE e009.
Message shown as 'Error while getting the file name'
ENDIF.
AT SELECTION-SCREEN ON RADIOBUTTON GROUP rg1.
IF r1 = 'X'.
IF p_file1 = '' OR p_file2 = ''.
MESSAGE w000 WITH 'Please select a PC file'.
ENDIF.
LOOP AT SCREEN.
IF screen-name = 'P_FILE1' OR
screen-name = 'P_FILE2'.
screen-input = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF r2 = 'X'.
PERFORM get_value USING 'P_PATH1' CHANGING p_path1.
PERFORM get_value USING 'PU_FILE1' CHANGING pu_file1.
PERFORM get_value USING 'P_PATH1' CHANGING p_path1.
PERFORM get_value USING 'PU_FILE2' CHANGING pu_file2.
IF pu_file1 = '' OR pu_file2 = ''.
MESSAGE w000 WITH 'Please select a UNIX file'.
LOOP AT SCREEN.
IF screen-name = 'PU_FILE1' OR
screen-name = 'PU_FILE2'.
screen-input = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pu_file1.
PERFORM get_value USING 'P_PATH1' CHANGING p_path1.
PERFORM get_value USING 'PU_FILE1' CHANGING pu_file1.
PERFORM popup_unix_filename CHANGING p_path1 pu_file1.
PERFORM set_value USING 'P_PATH1' p_path1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pu_file2.
PERFORM get_value USING 'P_PATH1' CHANGING p_path1.
PERFORM get_value USING 'PU_FILE2' CHANGING pu_file2.
PERFORM popup_unix_filename CHANGING p_path1 pu_file2.
PERFORM set_value USING 'P_PATH1' p_path1.
T O P - O F - P A G E *
TOP-OF-PAGE.
PERFORM delphi_header(z_delphi_header_footer)
USING
'E & S SD SCHEDULING AGREEMENTS EXTRACT DATA'(016)
space
sy-linsz.
S T A R T - O F - S E L E C T I O N *
START-OF-SELECTION.
IF r1 = 'X'.
PERFORM upload_data_from_pc_files.
ELSEIF r2 = 'X'.
PERFORM upload_data_from_unix_files.
ENDIF.
PERFORM check_input_data.
PERFORM get_sd_sa_data.
E N D - O F - S E L E C T I O N *
END-OF-SELECTION.
PERFORM process_data.
S U B - R O U T I N E S *
*& Form get_value
FORM get_value USING value(p_fieldname)
CHANGING value(p_fieldvalue).
IF v_repid IS INITIAL.
v_repid = syst-repid.
ENDIF.
REFRESH: tbl_dynpfields.
CLEAR: tbl_dynpfields.
tbl_dynpfields-fieldname = p_fieldname.
APPEND tbl_dynpfields.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = v_repid
dynumb = '1000'
TABLES
dynpfields = tbl_dynpfields
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
invalid_parameter = 7
undefind_error = 8
double_conversion = 9
stepl_not_found = 10
OTHERS = 11.
IF syst-subrc = 0.
READ TABLE tbl_dynpfields INDEX 1.
p_fieldvalue = tbl_dynpfields-fieldvalue.
ENDIF.
REFRESH: tbl_dynpfields.
ENDFORM. " get_value
FORM POPUP_UNIX_FILENAME *
Pops up dialog box to explore the unix filesystem and select a file *
--> VALUE(P_PATH) Path where to start exploring from *
--> VALUE(P_FILENAME) Default filename in the dialog box *
FORM popup_unix_filename CHANGING value(p_path) TYPE unixdir
value(p_filename) TYPE unixfile.
DATA: v_length TYPE i,
v_filename TYPE unixfile,
v_directory LIKE draw-filep,
v_file LIKE draw-filep.
IF p_filename(1) = '/' OR
p_path IS INITIAL.
v_filename = p_filename.
ELSE.
v_length = strlen( p_path ) - 1.
IF p_path+v_length(1) <> '/'.
CONCATENATE p_path '/' INTO p_path.
ENDIF.
CONCATENATE p_path p_filename INTO v_filename.
ENDIF.
CALL FUNCTION 'Z_UNIX_FILENAME_GET'
EXPORTING
def_filename = v_filename
mask = ',*.'
mode = 'G'
title = 'Get UNIX file...'
IMPORTING
filename = v_filename
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
CHECK syst-subrc = 0.
CALL FUNCTION 'CV120_SPLIT_PATH'
EXPORTING
pf_path = v_filename
IMPORTING
pfx_path = v_directory
pfx_file = v_file
EXCEPTIONS
OTHERS = 1.
CHECK syst-subrc = 0.
IF v_directory = p_path.
p_filename = v_file.
ELSE.
p_filename = v_filename.
ENDIF.
ENDFORM.
FORM SET_VALUE *
Sets the value of a field on the selection screen. *
--> VALUE(P_FIELDNAME) Name of the field on the selection screen*
--> VALUE(P_FIELDVALUE) Value of the field *
FORM set_value USING value(p_fieldname)
value(p_fieldvalue).
IF v_repid IS INITIAL.
v_repid = syst-repid.
ENDIF.
CLEAR: tbl_dynpfields.
tbl_dynpfields-fieldname = p_fieldname.
tbl_dynpfields-fieldvalue = p_fieldvalue.
APPEND tbl_dynpfields.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = v_repid
dynumb = '1000'
TABLES
dynpfields = tbl_dynpfields
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
OTHERS = 8.
ENDFORM.
*& Form upload_data_from_pc_files
This subroutine is used to upload the data from input files
FORM upload_data_from_pc_files.
REFRESH: tbl_matnr.
CLEAR: tbl_matnr.
Upload the data from Delphi Materials file
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = p_file1
filetype = 'DAT'
TABLES
data_tab = tbl_matnr
EXCEPTIONS
conversion_error = 1
file_open_error = 2
file_read_error = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
OTHERS = 10.
IF sy-subrc <> 0.
MESSAGE e008 WITH 'Materials file'.
Message shown as "Error while reading Materials file"
ENDIF.
IF sy-subrc = 0 AND tbl_matnr[] IS INITIAL.
MESSAGE e013 WITH 'Materials'.
Message shown as "No records found in Materials file"
ENDIF.
DELETE tbl_matnr WHERE matnr = ''.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = P_FILE6
filetype = 'DAT'
TABLES
DATA_TAB = TBL_CUST_SA
EXCEPTIONS
conversion_error = 1
file_open_error = 2
file_read_error = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
OTHERS = 10.
IF sy-subrc <> 0.
MESSAGE E008 WITH 'Customer/Sales Area Cross Reference file'.
Message shown as "Error while reading Materials file"
ENDIF.
ENDFORM. " upload_data_from_pc_files
*& Form upload_data_from_unix_files
This subroutine is used to upload the data from UNIX files
FORM upload_data_from_unix_files.
REFRESH: tbl_matnr.
CLEAR: tbl_matnr.
Get the complete filename for the Materials file
PERFORM get_full_filename USING pu_file1 CHANGING v_file1.
Open the Materials file
PERFORM open_dataset USING v_file1 'I' 'T' 1.
CHECK syst-subrc = 0.
Read the materials file
DO.
READ DATASET v_file1 INTO tbl_matnr.
IF syst-subrc <> 0.
EXIT.
ENDIF.
Populate the read data into the internal table
APPEND tbl_matnr.
ENDDO.
PERFORM close_dataset USING v_file1.
ENDFORM. " upload_data_from_unix_files
FORM GET_FULL_FILENAME *
Uses the logical path if necessary to get the full filename *
If the filename already has a directory specified, that itself will *
be the full filename *
Else the logical path for Conversions will be prefixed to the given *
filename *
FORM get_full_filename USING value(p_file) TYPE unixfile
CHANGING value(p_fullfile) TYPE unixfile.
DATA: v_length TYPE i.
IF p_file(1) = '/' OR
p_path1 IS INITIAL.
p_fullfile = p_file.
ELSE.
v_length = strlen( p_path1 ) - 1.
IF p_path1+v_length(1) = '/'.
CONCATENATE p_path1 p_file INTO p_fullfile.
ELSE.
CONCATENATE p_path1 '/' p_file INTO p_fullfile.
ENDIF.
ENDIF.
ENDFORM.
FORM OPEN_DATASET *
Opens dataset in the specified mode *
--> VALUE(P_FILE) Name of file to be opened *
--> VALUE(P_IOMODE) 'I' for Input / 'O' for Output *
--> VALUE(P_BTMODE) 'T' for Text / 'B' for Binary *
--> VALUE(P_LEVEL) If set to > 1, will write error message to *
list Else will supress the error message but *
will be available in SYST-MSGV1 *
FORM open_dataset USING value(p_file) TYPE unixfile
value(p_iomode) TYPE c
value(p_btmode) TYPE c
value(p_level) TYPE i.
DATA: v_rc LIKE syst-subrc,
v_msg(100),
v_listmsg(100).
IF p_iomode = 'O'.
IF p_btmode = 'B'.
OPEN DATASET p_file FOR OUTPUT IN BINARY MODE MESSAGE v_msg.
ELSE.
OPEN DATASET p_file FOR OUTPUT IN TEXT MODE MESSAGE v_msg.
ENDIF.
ELSE.
IF p_btmode = 'B'.
OPEN DATASET p_file FOR INPUT IN BINARY MODE MESSAGE v_msg.
ELSE.
OPEN DATASET p_file FOR INPUT IN TEXT MODE MESSAGE v_msg.
ENDIF.
ENDIF.
IF syst-subrc <> 0.
v_rc = syst-subrc.
syst-msgv1 = v_msg.
IF p_level > 0.
CONCATENATE 'Unable to open' p_file
INTO v_listmsg
SEPARATED BY space.
IF p_iomode = 'O'.
CONCATENATE v_listmsg 'for Output'
INTO v_listmsg
SEPARATED BY space.
ELSE.
CONCATENATE v_listmsg 'for Input'
INTO v_listmsg
SEPARATED BY space.
ENDIF.
IF p_iomode = 'B'.
CONCATENATE v_listmsg 'in Binary mode'
INTO v_listmsg
SEPARATED BY space.
ELSE.
CONCATENATE v_listmsg 'in Text mode'
INTO v_listmsg
SEPARATED BY space.
ENDIF.
WRITE: / v_listmsg.
WRITE: /3 '--', v_msg.
syst-subrc = v_rc.
ENDIF.
ENDIF.
ENDFORM.
FORM CLOSE_DATASET *
Closes dataset *
--> VALUE(P_FILE) Name of the file to be closed *
FORM close_dataset USING value(p_file) TYPE unixfile.
CLOSE DATASET p_file.
ENDFORM.
*& Form check_input_data
This subroutine is used to check the data from X Ref files
FORM check_input_data.
DESCRIBE TABLE tbl_matnr LINES v_count.
Use the material conversion routine to pad the material numbers
with zeroes
LOOP AT tbl_matnr.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
input = tbl_matnr-matnr
IMPORTING
output = tbl_matnr-matnr
EXCEPTIONS
length_error = 1
OTHERS = 2.
TRANSLATE tbl_matnr-matnr TO UPPER CASE.
MODIFY tbl_matnr.
ENDLOOP.
Get the materials from SAP database using the input materials
IF NOT tbl_matnr[] IS INITIAL.
SORT tbl_matnr BY matnr.
SELECT matnr FROM mara
INTO TABLE tbl_mara
FOR ALL ENTRIES IN tbl_matnr
WHERE matnr = tbl_matnr-matnr.
SORT tbl_mara BY matnr.
ENDIF.
Check the existence of input materials in SAP database
LOOP AT tbl_matnr.
READ TABLE tbl_mara WITH KEY matnr = tbl_matnr-matnr
BINARY SEARCH.
IF sy-subrc <> 0.
CONCATENATE 'Material' tbl_matnr-matnr 'does not exist'
INTO tbl_error-error_text
SEPARATED BY space.
APPEND tbl_error.
CLEAR tbl_error.
DELETE tbl_matnr.
ENDIF.
ENDLOOP.
ENDFORM. " check_input_data
*& Form get_sd_sa_data
This subroutine is used to get the SD Scheduling data from database
FORM get_sd_sa_data.
*begin of changes - DN3K923909
DATA: tbl_vbep LIKE tbl_vbep_forecast OCCURS 0 WITH HEADER LINE,
tbl_vblb LIKE tbl_vblb_forecast OCCURS 0 WITH HEADER LINE.
*end of changes - ND3K923909
REFRESH: tbl_vbap_vapma, tbl_vbpa, tbl_vblb_forecast,
tbl_vblb_jit, tbl_vbep_forecast, tbl_vbep_jit.
CLEAR: tbl_vbap_vapma, tbl_vbpa, tbl_vblb_forecast,
tbl_vblb_jit, tbl_vbep_forecast, tbl_vbep_jit.
Get the Scheduling Agreements
SELECT avbeln aposnr
a~vgbel
AAUART avkorg avtweg aspart a~kunnr
a~ablfz
A~MATNR
a~pstyv
a~werks
a~lgort
a~vstel
ATRVOG BVBTYP BVSBED BBSTNK B~KTEXT
FROM VAPMA AS A INNER JOIN VBAK AS B
ON bvbeln = avbeln
INTO TABLE tbl_vbap_vapma
FOR ALL ENTRIES IN tbl_mara
WHERE a~matnr = tbl_mara-matnr
Begin of Changes - TIR-40266
AND a~vkorg IN s_vkorg
AND a~werks IN s_werks
End of Changes - TIR-40266
AND A~TRVOG = '3'
AND B~VBTYP IN S_VBTYP. "Murali Poli
and a~abgru = ''
and b~gueen >= p_gueen.
SORT tbl_vbap_vapma BY vbeln posnr.
IF NOT tbl_vbap_vapma[] IS INITIAL.
SELECT VBELN POSNR VGBEL ABLFZ PSTYV LGORT VSTEL FROM VBAP
INTO TABLE TBL_VBAP FOR ALL ENTRIES IN TBL_VBAP_VAPMA
WHERE VBELN = TBL_VBAP_VAPMA-VBELN
AND POSNR = TBL_VBAP_VAPMA-POSNR.
LOOP AT TBL_VBAP_VAPMA.
READ TABLE TBL_VBAP WITH KEY VBELN = TBL_VBAP_VAPMA-VBELN
POSNR = TBL_VBAP_VAPMA-POSNR.
IF SY-SUBRC = 0 .
TBL_VBAP_VAPMA-VBELN = TBL_VBAP-VBELN.
TBL_VBAP_VAPMA-POSNR = TBL_VBAP-POSNR.
TBL_VBAP_VAPMA-VGBEL = TBL_VBAP-VGBEL.
TBL_VBAP_VAPMA-ABLFZ = TBL_VBAP-ABLFZ.
TBL_VBAP_VAPMA-PSTYV = TBL_VBAP-PSTYV.
TBL_VBAP_VAPMA-LGORT = TBL_VBAP-LGORT.
TBL_VBAP_VAPMA-VSTEL = TBL_VBAP-VSTEL.
MODIFY TBL_VBAP_VAPMA .
ENDIF.
ENDLOOP.
tbl_vbap_vapma_temp[] = tbl_vbap_vapma[].
*--Begin of UnCommentDIR-51476-DN3K932648
-------------- Begin of Comment ----------- CCR-50124 DN3K928457
SORT tbl_vbap_vapma_temp BY vbeln.
DELETE ADJACENT DUPLICATES FROM tbl_vbap_vapma COMPARING vbeln.
-------------- End of Comment ----------- CCR-50124 DN3K928457
*--End of UnCommentDIR-51476-DN3K932648
*--Begin of CommentDIR-51476-DN3K932648
-------------- Begin of Insert ----------- CCR-50124 DN3K928457
Duplicate Line Items are being deleted.
SORT tbl_vbap_vapma BY vbeln posnr.
DELETE ADJACENT DUPLICATES FROM tbl_vbap_vapma COMPARING vbeln posnr.
The field for contract in SA is being modified for uniqueness
loop at tbl_vbap_vapma.
clear: v_vgbel, v_posnr.
v_vgbel = tbl_vbap_vapma-vgbel.
v_posnr = tbl_vbap_vapma-posnr.
if not v_vgbel is initial .
shift v_vgbel left deleting leading v_zero.
shift v_posnr left deleting leading v_zero.
v_posnr = v_posnr / 10.
condense: v_vgbel, v_posnr.
if v_posnr le 9.
concatenate v_vgbel '0' v_posnr into v_vgbel.
else.
concatenate v_vgbel v_posnr into v_vgbel.
endif.
endif.
tbl_vbap_vapma-vgbel = v_vgbel.
modify tbl_vbap_vapma.
endloop.
-------------- End of Insert ----------- CCR-50124 DN3K928457
*--End of CommentDIR-51476-DN3K932648
Get the Partner details
select vbeln posnr parvw kunnr
*Start of Murali Poli
SELECT VBELN POSNR INCO1 INCO2
INTO TABLE TBL_VBKD
FROM VBKD
FOR ALL ENTRIES IN TBL_VBAP_VAPMA
WHERE VBELN = TBL_VBAP_VAPMA-VBELN.
and posnr = tbl_vbap_vapma-posnr.
*End of Murali Poli
SELECT vbeln posnr parvw kunnr lifnr "DN3K923909
INTO TABLE tbl_vbpa
FROM vbpa
FOR ALL ENTRIES IN tbl_vbap_vapma_temp
WHERE vbeln = tbl_vbap_vapma_temp-vbeln
AND parvw IN ('WE', 'SP').
*begin of changes - DN3K923909
select vbeln posnr abart abefz labnk abrdt gjkun vjkun
into table tbl_vblb_forecast
from vblb
for all entries in tbl_vbap_vapma
where vbeln = tbl_vbap_vapma-vbeln
and posnr = tbl_vbap_vapma-posnr
and abrli = '0000'
and abart = '1'.
SELECT vbeln posnr abart abefz labnk abrdt gjkun vjkun
INTO TABLE tbl_vblb
FROM vblb
FOR ALL ENTRIES IN tbl_vbap_vapma
WHERE vbeln = tbl_vbap_vapma-vbeln
AND posnr = tbl_vbap_vapma-posnr
AND abrli = '0000'
AND abart IN ('1','2').
SELECT vbeln posnr etenr edatu ezeit wmeng prgrs abart
INTO TABLE tbl_vbep
FROM vbep
FOR ALL ENTRIES IN tbl_vbap_vapma
WHERE vbeln = tbl_vbap_vapma-vbeln
AND posnr = tbl_vbap_vapma-posnr
AND abart IN ('1','2').
Get the current Forecast delivery schedule
tbl_vblb_forecast[] = tbl_vblb[].
DELETE tbl_vblb_forecast WHERE abart = '2'.
Get the current Forecast Schedule lines
tbl_vbep_forecast[] = tbl_vbep[].
DELETE tbl_vbep_forecast WHERE abart = '2'.
Get the current JIT delivery Schedule
select vbeln posnr abart abefz labnk abrdt gjkun vjkun
into table tbl_vblb_jit
from vblb
for all entries in tbl_vbap_vapma
where vbeln = tbl_vbap_vapma-vbeln
and posnr = tbl_vbap_vapma-posnr -
Need to create screen exit for Sales Order Transaction
Hi all,
I need to show some additional data on 'ADDITIONAL DATA B' tab of the sales order transaction... I have created a project but not able to get the enhancements that are to be used...
Will be really very heplful if you let me know, which one to use also why to use it...and how to determine which enhancement is to be used.... As i am new to User Exits...Hi ,
Check out this exits.
SDTRM001 Reschedule schedule lines without a new ATP check
V45A0001 Determine alternative materials for product selection
V45A0002 Predefine sold-to party in sales document
V45A0003 Collector for customer function modulpool MV45A
V45A0004 Copy packing proposal
V45E0001 Update the purchase order from the sales order
V45E0002 Data transfer in procurement elements (PRreq., assembly)
V45L0001 SD component supplier processing (customer enhancements)
V45P0001 SD customer function for cross-company code sales
V45S0001 Update sales document from configuration
V45S0003 MRP-relevance for incomplete configuration
V45S0004 Effectivity type in sales order
V45W0001 SD Service Management: Forward Contract Data to Item
V46H0001 SD Customer functions for resource-related billing
V60F0001 SD Billing plan (customer enhancement) diff. to billing plan
SDAPO001 Activating Sourcing Subitem Quantity Propagation
Check some of badi .
Please reward if useful. -
Exporting a Report to a pdf file with drill down!
Hi,
I would like to export a Report to a pdf file.
My Report includes drill down options. I require the exported pdf with drill down options.
(Similar to Navigation options in a PDF file).
I hope this makes sense.
Please provide a better solution for me.
If am not wrong, this facility is not available with Crystal Reports!!!
Thanks,
Ramesh.Hi Ramesh
You can download the trial versions of the Crystal Report from the following link:
https://websmp202.sap-ag.de/support (Please copy the link and paste it to your web browser).
You can get the license by putting a request in the follwoing link:
https://websmp202.sap-ag.de/support(Click on Request License key under Service Corner).
Hope it helps.
Regards
Sourashree Ghosh -
Agregated value in original report in not same as the drill down report
Hello experts,
I have a issue with the drill down reports.
Agregated value in the main report is not equal to the agregarated value in the drill down report.
In my report I have a sales for jan 2011,feb 2011 so on
For jan 2011 it is some thing $56000
when I click on this amount it giving the detail level for each region sales and at the end it is giving the total sales for jan 2011 as $98000
My question is why there such difference in the total amount when we are drilling down?
Please help me in this regard. I am new to obiee.hello
do you have any filters on this report that would related to measures?
if so, remove these filters and see if you still get different values;
rgds -
Need a Report for a List of PO's against a Sales Order
Need a Report for a List of PO's against a Sales Order
Hi
We can get through Me2n, with selection parameters with account assignment as C (Sales Order)
Regards
Prasanna -
Report on Change in Condition Record effects which all Sales Orders
Hello Gurus,
Thanks in advance. My customer requires a report which gives him list of Sales Orders effected due to Change in Condition Record.
Proper input to this will be greatly rewarded.
Regards,
Vishvesh Kamdarhi,
whenever u change the condition record it will fall under the validility date, ie.,
<b>example:</b>
Condition record for cond type PR00 is
<b>valid from 01/05/2007 to 31/99/9999 is Rs.1000</b>
but suddenly when u change prices on 01/10/2007 then system will display has below
<b>vaild from 01/05/2007 to 31/09/2007 is Rs.1000
vaild from 01/10/2007 to 31/99/999 is Rs.1500</b>
hence u take all the sale orders & billing document which are created from 01/10/2007, this will slove ur purpose
SE16-->vbak--->enter -
> here u will find created on enter the date & execute
hope this heklps u
regards,
Arunprasad -
Oracle std report to fetch all the backordered lines from the sales orders
Hello Experts,
Is there any standard Oracle report which can provide us the details of all the backordered lines in all the sales orders? Pls advise.
Regards,
VidhiThere is a report called "Backorder Detail Report" under Shipping Execution.
-
Maintain a drop down as sales order item text
Hi,
I need to add another text type to sales order item text,. However instead of entering text isnt it possible to have a drop down where users can select a text?
Any ideas?
Thanks
KeshiIt is not possible to select a text using drop down menu. You only can add a text type and populate the text during transaction.
Alternatively you can do the following.
Create some text elements and maintain texts for them. say 5 texts.
Now create a text type in normal text determination.
Using some user exits, you can automatically decide based on your requirement the text element from where the text has to be populated for this text type.
This should work fine for you.
Reward if this helps you -
Need to load only few sales orders from ecc to bi 7?
Hi all,
there were couple of sales orders is missing for a particular day? we need to load it. there was deltas from the psa to the ods.
how to load from psa to the ods when there is deltas!. using the dtp?
what is the process to carry out loading a particular records from the psa to the ods without affectingthe deltas in bi 7?
can anyone pls help me on this!!
Thanks
poojaHi Pooja,
Have you loaded any data to DSO till now?
If not i hope you might be having two requests in PSA if you have done one Full & one Delta load in Infopackage??
(or) might be one if you have done only one Full Load.
Follow these steps if you have notyet loaded any data to DSO:-
Now create a DTP> right click on the DTP folder>create DTP--> here you can either select FULL or DELTA load since everything will be DELTA for the first time & all the data will be loaded.
Follow this if you already having any requests in DSO:-
You might have done FULL DTP for the first time
So now create a net DELTA DTP & Execute so that only new Delta records will be loaded.
Hope it helps!
Regards,
Pavan -
Fields need to be maintained in Sales order
Hi gurus,
I wan to maintain two fields in sales order, one is agent(middlemen who facilitate sales) and companies sales representative fields for 3 respresentatives. Anyway these two were defined in Partner functions and assigned to account group. I want these person names to display in sales order since these persons will get commission on their sales. And also pls let me know how to assign commission amount to theim , do i need to create any seperate G/L account.
(I will create condition type to maintain condition records for each sales representative and agent seperately)
waiting for reply, pls help
RegardsTo have these partners show up on the sales order, you need to assign them to the sales order header partner determination routine.
You can use an accrual condition to compute and account for a commission. If you have different rates for different sales reps, you will probably need to add the partners to the SD pricing communication structure - which requires a little bit of ABAP coding.
In terms of needing a different G/L account for commissions payable: in all likelihood you will. However, this is normally an accounting policy decision. -
In ASCP Workbench - Need to take action against sales order types
Hi Team,
I am facing one issue, In ASCP workbench, when we query an item with conditions Order type=Sales Order, I can see many rows with Action=Release, Action=None.
Some rows with Action=None is in pink colour (without taking action against this in ASCP WB) and some in black colour.
For rows with Action = Release, We can check the Release check box and can modify the "Implement date" field, Save and Release (Tools-->Release). Then we can see the changes in Schedule ship date field in Sales Order line (Source Instance)
But for Action=None, We can't check the Release check box (But User want to implement New date for this also)
Since this is linked with OM, I am in a position to solve the issues urgently based on the below questions.
1. Which one triggers the Action=Release or None
2. What modification needs to change in SO line (Source instance) to know the changes in Action column in ASCP WB.
3. User needs to implement new dates for the items having Action=None also. For this how can override or any workaround is there?
Note: For the items having same Old due dates and
Please suggest me ASAP.
Thanks and Regards,
RameshDear Ramesh
Ones in Pink - Your plan is ATP enabled plan. So if there is a new sales order entered in OM module there is a sales order entry made in the ATP table the moment its scheduled in source. But since ASCP has nt been run yet they are still showing actiona s none in the plan.
W r t one with action release your understanding of ship date updation through ascp release is correct.
Why does customer want to chnage date on other sales orders (action-none) ? . ASCP has planned and it is saying that such is the date of expected shipment and so action is none. Any business reason why a date change and release is required on action none sales orders? By default behaviour action None cant be released to source .
Best Regards
Partha -
Need clarification about block in Sale order
we would like to know is there any other standard t-code available to do the sales order block removal which we are doing through VA02. blocks like schedule line block, road permit block. Thescenario is as follows:
Line Item Vise :
Z1 Block - If the Customer Doenst want the material / Order waiting for Statutory Document / PO issue / Off Spec ,Z1 Block on the line Item level is used inorder to stop MO during Order Loading
Z3 Block - If an order has more than one line items and Business / Customer needs only 1 Item to be fulfilled and remg items to be fulfilled at the later stage or material has to be diverted to Other orders Z3 block is used during scheduling subject to Business Approvals.
Header Vise :
Z1 Block - Customer cancellation happens post order loading and post mfg ,Z1 block is used in Header Level - done during Post Order Loading Subject to business Approvals.
Z3 Block - If the Demand is More than the supply and Business / Customer Needs critical order delivery to happen for specific Orders,Z3 block is used in order make the FG free and allocate specific Orders subject to Business Approvals.
Partial Delivery of a PO on Allocation:
Business requires Material for T Models to go on Allocation .Suppose 2 MTMs are loaded in the same SO but business needs only one MTM to be billed and hold Other MTM Delivery Grouping is changed in the SO and qty has to be broken in accordance with the allocation
Partial Delivery of a PO on Relation:
If Supply is not there for the Entire PO and still Customer requires Partial Qty whatever it has then the same will made Partillay after getting customer concurrence
what is the standard t code availabel in the sceanrioHi,
You can try TCode V.00
This transaction when executed will give you the list of all the sales documents blocked for delivery per sales organization. There are various other criteria which might be useful. This transaction will allow you to edit each sales document.
If this is not the one that you want, then perhaps you might have to develop one.
Thanks
Mukund S -
What fileds do need to inlcude when a sales order gets update
HI Guys,
Can you please help me i need to develop a sales order.when ever its get updated its need to triger through Bapi.
Regd's
Rajesh.Hi,
1. Configure the IDoc with message type ORDERS and basic IDoc type as ORDERS05 (You have to follow common step-by-step approach)
2. Configure Message Control to automatically generate IDoc whenever a Sales Order is created. (I mean output type)
So whenever a Sales Order is created, output type will generate an IDoc.
Hope this information is useful.
Regards,
AK
Maybe you are looking for
-
So....I have some questions about iTunes home sharing. My family backs up our main iTunes library to our 27" iMac, with the majority of the tracks being saved onto an external hard drive. I have a 17" MacBook Pro that I take with me to work every day
-
Hello ! fisrt of all , excuse my bad english (i'm french) i really need help to explain (interpret) this project: http://lionbob.free.fr/labview/ u can see the 2 screen shots i took : http://lionbob.free.fr/labview/Labview1.jpg http://lionbob.free.fr
-
Performance issue of WS-X4013 on 4006
Dear All, I have created many vlan on 4006 switch with sup WS-X4013. I found that the cpu usage is high (esp. on STP process). What is the maximum number of vlan and stp support on WS-X4013 with 4006? How can I solve this high cpu problem. Thanks.
-
Authorization for material type
hi, pls advice how to set the authorization for each material type thanks
-
NO SERVICE - SEARCHING...
Hey guys... I have an Iphone 5 and from yesterday it says Searching and No Service and when i want to go to the Cellular setting it suddenly disappears ... Ii don't know what to do... I restored the network setting but doesn't work... i don't have 8