Info Record BDC
Hi All
We have a BDC to upload Material Purchase Price now I have a probelm where in while uploading file system pop-ups two different screens when I reach to condition tab one is create condition xxxx : fast entry and other is FOB Total condition xxxx : condition supplements.
In our programme we have a loigic where while uploading file system will always have fast entry. Now I do not know in which case system refers to condition supplements screen.
Regards
Swara
I am confused now.
first you said you havea problem with BDC, now you are saying you have this problem in ME11 and ME12.
Whats true?
Similar Messages
-
Purchase info record BDC Condition type for gross price
Hi,
I have got flat file with vendor material plant porg conditon type price.
It has to be posted to SAP purchase info record.
The first condition type is always for gross price.
How can I validate whether the condition type given in the file will be for gross price and will be applicable for that vendor or material given in the file.
Regards,
PraveenCheck with A017 Table
Thanks
Seshu -
Purchase Info Record Change (ME12) using BDC
Hi All,
We are trying to change the Purchase Info Records using BDCs. We have about 20 condition records to change. Not all condition records change all the time. How can we use page control to identify the particular condition records that we want to change.
Thanks
HariHi Krishna,
The BDC that we are trying to build will have the changes. For ex: When we created the info record (using a BDC) we had 15 condition records. This is coming from an external source.
Now, there has been a change in the pricing (outside the system). This is communicated from the external system. We need to pinpoint which condition types to update in SAP, based on the values in the external system through the BDC.
Regards
Hari -
Uploading info records by using BDC
Hi all,
Does any one having knowledge in uploading info records (ME11) by using BDC.
Problem arises when going for multiple scales.
Can any one let me know how proceed this BDC.
Regards,
RajGoto transaction SHBD enter a recording name and specify the transaction code.
Enter the test data and save it , it will actomatically create a bdc program.
now select that recording name and click create program icon and specify the program name.
This is the program which was created using transaction SHDB for XD01.
include bdcrecx1.
parameters: dataset(132) lower case.
DO NOT CHANGE - the generated data section - DO NOT CHANGE ***
If it is nessesary to change the data section use the rules:
1.) Each definition of a field exists of two lines
2.) The first line shows exactly the comment
'* data element: ' followed with the data element
which describes the field.
If you don't have a data element use the
comment without a data element name
3.) The second line shows the fieldname of the
structure, the fieldname must consist of
a fieldname and optional the character '_' and
three numbers and the field length in brackets
4.) Each field must be type C.
Generated data section with specific formatting - DO NOT CHANGE ***
data: begin of record,
data element: KUN16
KUNNR_001(016),
data element: BUKRS
BUKRS_002(004),
data element: VKORG
VKORG_003(004),
data element: VTWEG
VTWEG_004(002),
data element: SPART
SPART_005(002),
data element: KTOKD
KTOKD_006(004),
data element: ANRED
ANRED_007(015),
data element: NAME1_GP
NAME1_008(035),
data element: SORTL
SORTL_009(010),
data element: NAME2_GP
NAME2_010(035),
data element: STRAS_GP
STRAS_011(035),
data element: PFACH
PFACH_012(010),
data element: ORT01_GP
ORT01_013(035),
data element: PSTLZ
PSTLZ_014(010),
data element: ORT02_GP
ORT02_015(035),
data element: PFORT_GP
PFORT_016(035),
data element: PSTL2
PSTL2_017(010),
data element: LAND1_GP
LAND1_018(003),
data element: REGIO
REGIO_019(003),
data element: SPRAS
SPRAS_020(002),
data element: TELX1
TELX1_021(030),
data element: TELF1
TELF1_022(016),
data element: TELFX
TELFX_023(031),
data element: TELF2
TELF2_024(016),
data element: TELTX
TELTX_025(030),
data element: TELBX
TELBX_026(015),
data element: URL
KNURL_027(132),
data element: STCD1
STCD1_028(016),
data element: STCD2
STCD2_029(011),
data element: BBBNR
BBBNR_030(007),
data element: BBSNR
BBSNR_031(005),
data element: BUBKZ
BUBKZ_032(001),
data element: BRSCH
BRSCH_033(004),
data element: LZONE
LZONE_034(010),
data element: KUKLA
KUKLA_035(002),
data element: BRSCH
BRSCH_036(004),
data element: UMSA1
UMSA1_037(020),
data element: UWAER
UWAER_038(005),
data element: UMJAH
UMJAH_039(004),
data element: JMZAH
JMZAH_040(006),
data element: JMJAH
JMJAH_041(004),
data element: BANKS
BANKS_01_042(003),
data element: BANKK
BANKL_01_043(015),
data element: BANKN
BANKN_01_044(018),
data element: ABLAD
ABLAD_01_045(025),
data element: KNKAL
KNFAK_01_046(002),
data element: CIVVE
CIVVE_047(001),
data element: ANRED_AP
ANRED_01_048(030),
data element: ANRED_AP
ANRED_02_049(030),
data element: NAMEV_VP
NAMEV_01_050(035),
data element: NAMEV_VP
NAMEV_02_051(035),
data element: NAME1_GP
NAME1_01_052(035),
data element: NAME1_GP
NAME1_02_053(035),
data element: TELF1
TELF1_01_054(016),
data element: TELF1
TELF1_02_055(016),
data element: ABTNR_PA
ABTNR_01_056(004),
data element: ABTNR_PA
ABTNR_02_057(004),
data element: AKONT
AKONT_058(010),
data element: DZTERM
ZTERM_059(004),
data element: MAHNA
MAHNA_060(004),
data element: BZIRK
BZIRK_061(006),
data element: AWAHR
AWAHR_062(003),
data element: WAERS_V02D
WAERS_063(005),
data element: KALKS
KALKS_064(001),
data element: LPRIO
LPRIO_065(002),
data element: KZAZU_D
KZAZU_066(001),
data element: ANTLF
ANTLF_067(001),
data element: PERFK
PERFK_068(002),
end of record.
End generated data section ***
start-of-selection.
perform open_dataset using dataset.
perform open_group.
do.
read dataset dataset into record.
if sy-subrc <> 0. exit. endif.
perform bdc_dynpro using 'SAPMF02D' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KTOKD'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02D-KUNNR'
record-KUNNR_001.
perform bdc_field using 'RF02D-BUKRS'
record-BUKRS_002.
perform bdc_field using 'RF02D-VKORG'
record-VKORG_003.
perform bdc_field using 'RF02D-VTWEG'
record-VTWEG_004.
perform bdc_field using 'RF02D-SPART'
record-SPART_005.
perform bdc_field using 'RF02D-KTOKD'
record-KTOKD_006.
perform bdc_dynpro using 'SAPMF02D' '0110'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-KNURL'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNA1-ANRED'
record-ANRED_007.
perform bdc_field using 'KNA1-NAME1'
record-NAME1_008.
perform bdc_field using 'KNA1-SORTL'
record-SORTL_009.
perform bdc_field using 'KNA1-NAME2'
record-NAME2_010.
perform bdc_field using 'KNA1-STRAS'
record-STRAS_011.
perform bdc_field using 'KNA1-PFACH'
record-PFACH_012.
perform bdc_field using 'KNA1-ORT01'
record-ORT01_013.
perform bdc_field using 'KNA1-PSTLZ'
record-PSTLZ_014.
perform bdc_field using 'KNA1-ORT02'
record-ORT02_015.
perform bdc_field using 'KNA1-PFORT'
record-PFORT_016.
perform bdc_field using 'KNA1-PSTL2'
record-PSTL2_017.
perform bdc_field using 'KNA1-LAND1'
record-LAND1_018.
perform bdc_field using 'KNA1-REGIO'
record-REGIO_019.
perform bdc_field using 'KNA1-SPRAS'
record-SPRAS_020.
perform bdc_field using 'KNA1-TELX1'
record-TELX1_021.
perform bdc_field using 'KNA1-TELF1'
record-TELF1_022.
perform bdc_field using 'KNA1-TELFX'
record-TELFX_023.
perform bdc_field using 'KNA1-TELF2'
record-TELF2_024.
perform bdc_field using 'KNA1-TELTX'
record-TELTX_025.
perform bdc_field using 'KNA1-TELBX'
record-TELBX_026.
perform bdc_field using 'KNA1-KNURL'
record-KNURL_027.
perform bdc_dynpro using 'SAPMF02D' '0120'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-LZONE'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNA1-STCD1'
record-STCD1_028.
perform bdc_field using 'KNA1-STCD2'
record-STCD2_029.
perform bdc_field using 'KNA1-BBBNR'
record-BBBNR_030.
perform bdc_field using 'KNA1-BBSNR'
record-BBSNR_031.
perform bdc_field using 'KNA1-BUBKZ'
record-BUBKZ_032.
perform bdc_field using 'KNA1-BRSCH'
record-BRSCH_033.
perform bdc_field using 'KNA1-LZONE'
record-LZONE_034.
perform bdc_dynpro using 'SAPMF02D' '0125'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-JMJAH'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNA1-KUKLA'
record-KUKLA_035.
perform bdc_field using 'KNA1-BRSCH'
record-BRSCH_036.
perform bdc_field using 'KNA1-UMSA1'
record-UMSA1_037.
perform bdc_field using 'KNA1-UWAER'
record-UWAER_038.
perform bdc_field using 'KNA1-UMJAH'
record-UMJAH_039.
perform bdc_field using 'KNA1-JMZAH'
record-JMZAH_040.
perform bdc_field using 'KNA1-JMJAH'
record-JMJAH_041.
perform bdc_dynpro using 'SAPMF02D' '0130'.
perform bdc_field using 'BDC_CURSOR'
'KNBK-BANKN(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'KNBK-BANKS(01)'
record-BANKS_01_042.
perform bdc_field using 'KNBK-BANKL(01)'
record-BANKL_01_043.
perform bdc_field using 'KNBK-BANKN(01)'
record-BANKN_01_044.
perform bdc_dynpro using 'SAPMF02D' '0130'.
perform bdc_field using 'BDC_CURSOR'
'KNBK-BANKS(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPMF02D' '0340'.
perform bdc_field using 'BDC_CURSOR'
'KNVA-KNFAK(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'KNVA-ABLAD(01)'
record-ABLAD_01_045.
perform bdc_field using 'KNVA-KNFAK(01)'
record-KNFAK_01_046.
perform bdc_dynpro using 'SAPMF02D' '0340'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KUNNR'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPMF02D' '0370'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-CIVVE'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'KNA1-CIVVE'
record-CIVVE_047.
perform bdc_dynpro using 'SAPMF02D' '0360'.
perform bdc_field using 'BDC_CURSOR'
'KNVK-ABTNR(02)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'KNVK-ANRED(01)'
record-ANRED_01_048.
perform bdc_field using 'KNVK-ANRED(02)'
record-ANRED_02_049.
perform bdc_field using 'KNVK-NAMEV(01)'
record-NAMEV_01_050.
perform bdc_field using 'KNVK-NAMEV(02)'
record-NAMEV_02_051.
perform bdc_field using 'KNVK-NAME1(01)'
record-NAME1_01_052.
perform bdc_field using 'KNVK-NAME1(02)'
record-NAME1_02_053.
perform bdc_field using 'KNVK-TELF1(01)'
record-TELF1_01_054.
perform bdc_field using 'KNVK-TELF1(02)'
record-TELF1_02_055.
perform bdc_field using 'KNVK-ABTNR(01)'
record-ABTNR_01_056.
perform bdc_field using 'KNVK-ABTNR(02)'
record-ABTNR_02_057.
perform bdc_dynpro using 'SAPMF02D' '0360'.
perform bdc_field using 'BDC_CURSOR'
'KNVK-NAMEV(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPMF02D' '0210'.
perform bdc_field using 'BDC_CURSOR'
'KNB1-AKONT'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNB1-AKONT'
record-AKONT_058.
perform bdc_dynpro using 'SAPMF02D' '0215'.
perform bdc_field using 'BDC_CURSOR'
'KNB1-ZTERM'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNB1-ZTERM'
record-ZTERM_059.
perform bdc_dynpro using 'SAPMF02D' '0220'.
perform bdc_field using 'BDC_CURSOR'
'KNB5-MAHNA'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNB5-MAHNA'
record-MAHNA_060.
perform bdc_dynpro using 'SAPMF02D' '0230'.
perform bdc_field using 'BDC_CURSOR'
'KNB1-VRSNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02D' '0310'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-WAERS'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNVV-BZIRK'
record-BZIRK_061.
perform bdc_field using 'KNVV-AWAHR'
record-AWAHR_062.
perform bdc_field using 'KNVV-WAERS'
record-WAERS_063.
perform bdc_field using 'KNVV-KALKS'
record-KALKS_064.
perform bdc_dynpro using 'SAPMF02D' '0315'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-LPRIO'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNVV-LPRIO'
record-LPRIO_065.
perform bdc_field using 'KNVV-KZAZU'
record-KZAZU_066.
perform bdc_field using 'KNVV-ANTLF'
record-ANTLF_067.
perform bdc_dynpro using 'SAPMF02D' '0320'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-PERFK'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNVV-PERFK'
record-PERFK_068.
perform bdc_dynpro using 'SAPMF02D' '1350'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KUNNR'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPMF02D' '0324'.
perform bdc_field using 'BDC_CURSOR'
'KNVP-PARVW(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_transaction using 'XD01'.
enddo.
perform close_group.
perform close_dataset using dataset.
Reward if found helpful....
Cheers,
Chandra Sekhar. -
BDC for Purchase info records in AFS
Hi Everyone,
I could not found any BAPI,IDOC,FM with supports for uploading purchase info records in AFS, is the only way is to do is recording or any thing else supports.
Regards,
Srinath.Hi Srinath,
You have posted on a wrong forum. Please close your thread.
You may check this thread and post to your question there:
*The operation cannot be carried out with this node type*
Thanks,
Gordon -
Mass Creation of Purchasing Info Records
Hi all,
we want to change the vendor for a certain amount of articles (old vendor e.g. 102, new vendor e.g. 768).
To order the articles (maybe approx. 1000) by the new vendor, we need to create new Purchasing Info Record (for vendor 768) for every article bought by vendor 102.
Is there a standard transaction to handle this? MASS_EINE doesn't seem to fit to my problem.
Regards,
TobiasHi Tobias,
You need to go for creating new Inforecord for Article, Vendor, Porg and Site Combination .
You should not go for Mass Maintanace for changing vendor.
Go for Uploading by LSMW or BDC for ME11 tcode.
Regards,
Selvakumar. M -
Need BAPI for change of quality info record (Tcode: QI02)
Hi,
Currenrly iam using BDC for creation of Quality info record (QI01) and now i need to do this creation as a back ground task. for which BDC is not supporting. So, i need to know the relavent BAPI for creation/change of QI02.
Regards,
Krishna.Hi,
Have you tried doing this in ECATT??
See this Link:
http://help.sap.com/bestpractices/BBLibrary/Documentation/G09_BB_InstallGuide_EN_DE.doc -
Vendor Info Records: No Purchasing org. data exists
Hello Team,
I see a lot of Info records that have no purchasing org. data.
How can this be maintained or do I just create new info records?
Thank you in advance.Hi Joel,
You can make use of BDC or use me11 to extend the same.
Regards
Ramesh ch -
Number of Condition Records in Pur. Info Record
I am trying to get the number of condition records in a purchase info record.
using ME_GET_INFORECORD_CONDITIONS and also ME_GET_INFORECORD_CONDITIONS_1.
ME_GET_INFORECORD_CONDITIONS_1 gives me the correct values when I try to test the FM.
What is the diff between these 2 FMs.
But when I use ME_GET_INFORECORD_CONDITIONS_1 in a report, it is not giving a correct value.
Following is the code:
DATA: IT_KONP TYPE KONP OCCURS 0 WITH HEADER LINE,
WA_KONP TYPE KONP.
DATA: coun TYPE i VALUE 0.
"Get the number of condition record - should be useful in BDC call.
CALL FUNCTION 'ME_GET_INFORECORD_CONDITIONS_1'
EXPORTING
I_EKORG = 'U001'
I_ESOKZ = '0'
I_INFNR = '5300000320'
I_LIFNR = '200524'
I_MATKL = '001'
I_MATNR = '80141300'
I_WERKS = 'L001'
* I_VABME =
* I_BSTME =
TABLES
TKONP = IT_KONP.
LOOP AT IT_KONP.
ADD 1 to coun.
ENDLOOP.
WRITE: / coun.
The variable coun is always Zero.
RegThe LIFNR in the input parameters should be L-Padded with zeros. In SE37 it does it by itself.
reg -
Uploading Purchase Info Record
Hi Experts,
Can any one advice me what is the best method in BDC has to be used for the conversion of Purchase Info records.
Do we have a direct method, if yes Please help me out with the program name.
Thanks in AdvanceHi in LSMW
Go for
Object 0060 Purchasing info rec.
Method 0000
Program Name RM06IBI0
Program Type B Batch Input -
FM for creating / maintaining condition types of PIR ( info record)
Hi Exparts,
I required mass creation / updation of condition types of PIR or info records ( in ME11/ ME12 transaction). I tried BDC but it is getting very complex. Is there any FM / BAPI that could be used for this purpose.
Thanks in advance.
Regards,
abhishekPurchase Info records data are updated in EINA & EINE Tables and even it updates in A017 (Plant Specific) or A018 (Without Plant Specific) which is called as Material Info record.
To identify the Condition Types in info records, below are the steps.
Step 1: Record all the u201Cconditions Records Nou201D from A017 (Plant Specific) or A018 (Without Plant Specific) for the given Info Records.
Step 2: Based on this u201CStep 1 - condition record nou201D, Search the required u201CCondition Typeu201D in KONP Table by inserting the Cond. Record No and Cond. Type.
If it is helpful, reward points.
Regards,
Muralidharan -
Hi ,
I need to create and change the info records automatically from excel.(ME11).
Is there any BAPI for this or we need to do only in BDC technique.
Can anyone guide me in this issue.Hi Ramya,
Try with below FMs
ME_DIRECT_INPUT_INFORECORD
ME_POST_INFORECORD
ME_UPDATE_INFORECORD_PD.
There is not much validation being handled in this FMs so it may upload wrong data as well .. which may create problems..
No BAPIs available for creation of info records (ME11)
I would suggest you to go for BDC in this case..
[Link for BDC Example|FM or BAPI For uploading data in ME12 transaction;
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
ilesh Nandaniya -
Info Record Condition record changes
Hello Experts,
We have a requirement to change the % allotted to a particular condition type in Info record. there are no BAPI's available for info record change. I do not prefer BDCs. I am using 4.6c. Can you please provide me any other options for this requirement?
Thanks for your help!
Regards
SeemaI am using SAP-standard Batch Input RM06IBI0 (via LSMW). This should be available in 4.6c also.
Whether you like Batch Input or no ... I do not think that you have many more options available in 4.6c (except if you are going to re-invent the wheel ...). -
BAPI or FM to create PIR(Purchasing Info Record)
Hi all,
Is anyone aware of any BAPI or Function module which i can use to create Purchasing Infor Records.
Or else using BDC is the onlyHi Syed,
didnt find any BAPI for creating Info Records, so it seems BDC is the option.
but dere is a BAPI * BAPI_INFORECORD_GETLIST * for displaying the Info Records
Tk cr..
Regards
Karan -
BAPI or IDOCs for Quality info records
I want to know which BAPI or IDOCs is used to upload the Quality info records data from legacy system to SAP.
Hi Raghu
Below is the BDC program I was used for the same.
Program Name : YX30_UPLOAD_QUALITY_INFO
Author : Rameshwar Yadav *
Date : 2006-11-27 *
Description : The purpose of this program is to upload the *
Quality Info Record for I30 System *
Original Transport Number : I30K903055 *
SYS id: SYS_30_1502_03_41_Upload Quality Info Records *
TDS id: TD_30_1502_03_41_Upload Quality Info Records *
UT ID: UT_30_1502_03_41_Upload Quality Info Records *
======================================================================
Change History *
Date | Change No | Name | Description *
yyyy/mm/dd | AAAYYYYMMDD | xxxxxxxxxxxx | *
REPORT YX30_UPLOAD_QUALITY_INFO MESSAGE-ID yx30_conversions
no standard page heading line-size 255.
include yx30_upload_quality_info_top. "Include for Variable Declaration & Selection Screen
include yx30_upload_quality_info_data. "Include for File read & Authority Check
*& At Selection Screen Output *
AT SELECTION-SCREEN OUTPUT. "PBO
PERFORM fill_parameters.
*& Start Of Selection Event *
start-of-selection.
Perform Authority_check. "Subroutine for authority check
Perform prepare_file. "Subroutine for preparing file
perform file_read. "Subroutine for File read
perform update_qi01. "Subroutine for Uploading data
perform write_error_log1. "Subroutine for writing error log
*& Form write_error_log
text
--> p1 text
<-- p2 text
*& Include YX30_UPLOAD_QUALITY_INFO_TOP
Type Declaration
Types: Begin of type_qtyinf,
matnr type matnr, "Material No
lieferant type char10, "Vendor
werk type werks_d, "Plant
frei_dat type char10, "Frei_Dat
stsma type char8, "Stsma
anwso_01 type char1, "ANWSO(01)
anwso_02 type char1, "ANWSO(02)
anwso_03 type char1, "ANWSO(03)
end of type_qtyinf.
Internal Table Declaration
Data: itab_qtyinf type standard table of type_qtyinf. "Internal table for QTYINF.
Work Area Declaration
Data: wa_qtyinf type type_qtyinf. "Work Area for QTYINF.
Variable Declaration
Data: v_file_qtyinf type string, "Source File Name
v1 type string,
v2 type string,
v3 type string,
v_file_return type string,
v_lin TYPE n.
*Selection Screen Declaration
selection-screen *
SELECTION-SCREEN BEGIN OF BLOCK blk1
WITH FRAME TITLE text-s01.
PARAMETER:
p_sysid(3) TYPE c OBLIGATORY , "Source System
p_bukrs(4) TYPE c OBLIGATORY , "Source CompCode
p_samshr type char30 lower case obligatory default '/sap_upload/' , "Samba Share Drive
p_object TYPE CHAR10 OBLIGATORY default 'MAT' . "Migration Data Object
SELECTION-SCREEN END OF BLOCK blk1.
SELECTION-SCREEN SKIP 3.
PARAMETER:
cb_pfill TYPE c AS CHECKBOX DEFAULT 'X' . "Prefill values?
SELECTION-SCREEN COMMENT /1(79) text-s1a.
SELECTION-SCREEN BEGIN OF BLOCK blk3
WITH FRAME TITLE text-s03.
PARAMETER:
pa_filn1(500) TYPE c LOWER CASE
VISIBLE LENGTH 50 , "Filename AppServer
pa_dlimt TYPE c DEFAULT ';' . "Field Delimter
SELECTION-SCREEN END OF BLOCK blk3.
include bdcrecx1. "Include for the subroutine
*& Include YX30_UPLOAD_QUALITY_INFO_DATA
*& Form file_read
Subroutine for reading the source file into internal table
--> p1 text
<-- p2 text
FORM file_read .
DATA:
single_line TYPE string .
*-- read file, split lines into fields and put data into table
OPEN DATASET v_file_qtyinf FOR INPUT IN TEXT MODE ENCODING NON-UNICODE. "Opening the files
IF sy-subrc EQ 0.
DO.
READ DATASET v_file_qtyinf INTO single_line. "Reading the content of file into line
IF sy-subrc = 0.
IF sy-index > 1. "skip header-line
SPLIT "Split the content of line into work area
single_line
AT ';'
INTO
wa_qtyinf-matnr "Material No
wa_qtyinf-lieferant "Vendor
wa_qtyinf-werk "Plant
wa_qtyinf-frei_dat "Frei Date
wa_qtyinf-stsma "STSMA
wa_qtyinf-anwso_01 "ANWSO_01
wa_qtyinf-anwso_02 "ANWSO_02
wa_qtyinf-anwso_03. "ANWSO_03
APPEND wa_qtyinf TO itab_qtyinf. "Appending Work Area to internal table
ENDIF.
ELSE.
EXIT.
ENDIF.
ENDDO.
CLOSE DATASET v_file_qtyinf. "Closing the files
ELSE.
MESSAGE e015 .
ENDIF.
DESCRIBE TABLE itab_qtyinf LINES v_lin.
IF v_lin LT 0.
MESSAGE e016 .
ENDIF.
ENDFORM. " file_read
*& Form fill_parameters
Subroutine for getting the file name
FORM fill_parameters .
IF cb_pfill = 'X'.
Preparing QTYINF File
CONCATENATE p_sysid '_forward' INTO v3.
CONCATENATE p_sysid '_QTYINF_' p_bukrs '.CSV' INTO v2.
CONCATENATE p_samshr v3 '/' p_object '/' v2 INTO pa_filn1.
ENDIF.
ENDFORM. " fill_parameters
*& Form Authority_check
Authority Check
--> p1 text
<-- p2 text
FORM authority_check .
Authority Check For the Migration
AUTHORITY-CHECK OBJECT 'YX30_MIGR'
ID 'SYSTEM' FIELD p_sysid
ID 'BUKRS' FIELD p_bukrs
ID 'YX30_DMOBJ' FIELD p_object
ID 'ACTVT' FIELD '16'.
IF sy-subrc <> 0.
MESSAGE e010 WITH p_sysid p_bukrs p_object.
ENDIF.
ENDFORM. " Authority_check
*& Form prepare_file
text
--> p1 text
<-- p2 text
FORM prepare_file .
CONCATENATE p_sysid '_forward' INTO v3.
CONCATENATE p_sysid '_QTYINF_' p_bukrs '.CSV' INTO v2.
CONCATENATE p_samshr v3 '/' p_object '/' v2 INTO v_file_qtyinf.
CLEAR v3.
CLEAR v2.
Prepare Return File
CONCATENATE p_sysid '_forward' INTO v3.
CONCATENATE p_sysid '_RETRUN_LOG_' p_bukrs '.CSV' INTO v2.
CONCATENATE '/sap_upload/' v3 '/' 'MAT' '/' v2 INTO v_file_return.
ENDFORM. " prepare_file
*& Form update_qi01
text
FORM update_qi01.
PERFORM open_group. "Opening a session
CLEAR wa_qtyinf.
LOOP AT itab_qtyinf INTO wa_qtyinf.
PERFORM bdc_dynpro USING 'SAPMQBAA' '0100'. "Subroutine for mapping data
PERFORM bdc_field USING 'BDC_CURSOR'
'QINF-MATNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'QINF-MATNR'
wa_qtyinf-matnr. "Mapping the material
PERFORM bdc_field USING 'QINF-LIEFERANT'
wa_qtyinf-lieferant. "Mapping the vendor
PERFORM bdc_field USING 'QINF-WERK'
wa_qtyinf-werk. "Mapping the plant
PERFORM bdc_dynpro USING 'SAPMQBAA' '0101'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=STAN'.
PERFORM bdc_field USING 'QINF-FREI_DAT'
wa_qtyinf-frei_dat.
PERFORM bdc_field USING 'BDC_CURSOR'
'QINF-STSMA'.
PERFORM bdc_field USING 'QINF-STSMA'
wa_qtyinf-stsma. "Mapping the status
PERFORM bdc_dynpro USING 'SAPLBSVA' '0201'.
PERFORM bdc_field USING 'BDC_CURSOR'
'J_STMAINT-ANWSO(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=OKAY'.
IF wa_qtyinf-anwso_01 = 'X'.
PERFORM bdc_field USING 'J_STMAINT-ANWSO(01)'
wa_qtyinf-anwso_01. "Mapping the anwso(01)
ELSEIF wa_qtyinf-anwso_02 = 'X'.
PERFORM bdc_field USING 'J_STMAINT-ANWSO(02)'
wa_qtyinf-anwso_02. "Mapping the anwso(02)
ELSEIF wa_qtyinf-anwso_03 = 'X'.
PERFORM bdc_field USING 'J_STMAINT-ANWSO(03)'
wa_qtyinf-anwso_03. "Mapping the anwso(03)
ELSEIF wa_qtyinf-anwso_01 = 'X' AND wa_qtyinf-anwso_02 = 'X'.
PERFORM bdc_field USING 'J_STMAINT-ANWSO(01)'
wa_qtyinf-anwso_01.
PERFORM bdc_field USING 'J_STMAINT-ANWSO(02)'
wa_qtyinf-anwso_02.
ELSEIF wa_qtyinf-anwso_01 = 'X' AND wa_qtyinf-anwso_03 = 'X'.
PERFORM bdc_field USING 'J_STMAINT-ANWSO(01)'
wa_qtyinf-anwso_01.
PERFORM bdc_field USING 'J_STMAINT-ANWSO(03)'
wa_qtyinf-anwso_03.
ELSEIF wa_qtyinf-anwso_02 = 'X' AND wa_qtyinf-anwso_03 = 'X'.
PERFORM bdc_field USING 'J_STMAINT-ANWSO(02)'
wa_qtyinf-anwso_02.
PERFORM bdc_field USING 'J_STMAINT-ANWSO(03)'
wa_qtyinf-anwso_03.
ELSEIF wa_qtyinf-anwso_01 = 'X' AND wa_qtyinf-anwso_02 = 'X' AND wa_qtyinf-anwso_03 = 'X'.
PERFORM bdc_field USING 'J_STMAINT-ANWSO(01)'
wa_qtyinf-anwso_01.
PERFORM bdc_field USING 'J_STMAINT-ANWSO(02)'
wa_qtyinf-anwso_02.
PERFORM bdc_field USING 'J_STMAINT-ANWSO(03)'
wa_qtyinf-anwso_03.
ENDIF.
PERFORM bdc_dynpro USING 'SAPMQBAA' '0101'.
PERFORM bdc_field USING 'BDC_CURSOR'
'QINF-FREI_DAT'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=QMBU'.
PERFORM bdc_field USING 'QINF-FREI_DAT'
wa_qtyinf-frei_dat.
PERFORM bdc_field USING 'QINF-STSMA'
wa_qtyinf-stsma.
PERFORM bdc_transaction USING 'QI01'.
ENDLOOP.
PERFORM close_group. "Closing the session
ENDFORM. "update_qi01
*& Form write_error_log
text
--> p1 text
<-- p2 text
FORM write_error_log1 .
DATA:
single_line TYPE string,
v_msg TYPE string,
v_msg1 TYPE string.
*-- read file, split lines into fields and put data into table
OPEN DATASET v_file_return FOR INPUT IN TEXT MODE ENCODING NON-UNICODE. "Opening the files
IF sy-subrc EQ 0.
CONCATENATE text-020 v_lin INTO v_msg SEPARATED BY space.
CONCATENATE text-021 v_lin INTO v_msg1 SEPARATED BY space.
TRANSFER: v_msg TO v_file_return.
TRANSFER: v_msg1 TO v_file_return.
WRITE:/ v_msg.
WRITE:/ v_msg1.
ENDIF.
ENDFORM. " write_error_log
Regards,
Sree
Maybe you are looking for
-
PseudoResources in Automation Plugin
My company has published a small automation plugin for Photoshop using the Adobe Photoshop 5.0 SDK. It currently works on my machine (Windows 2000) using Photoshop 7.<br /><br />I'm trying to modify the plugin so that it saves some data in the curre
-
Creation of new batch while transfer posting
Dear Experts, Please guide me to meet the following requirement: I am posting the Goods Receipt for the production order to the Quality stock by using indicator X in T Code MB31. The material is batch Managed and QM is not implemented. Now after the
-
Error Viewing Fillable PDF Forms in Adobe Reader on iPhone/iPad
I created a fillable form on a Windows computer in Adobe Acrobat XI Pro, but when I open the document from an email attachment in the Adobe Reader app on my iPhone or iPad the top have of the form is blacked out (literally the top half of the documen
-
Deplacer barre des taches PSE 13
Bonjour, je suis passé de PSE 6 à PSE 13 et je suis un peu déçu de la présentation et de l'ergonomie. Notamment, l'emplacement du bouton retour en arrière ou rétablir qui oblige à des allers retours fréquents entre les menus déroulants en haut et la
-
My phone was freezing up so I turned it off. Now it won't turn back on. It had a charge plus I tried charging it to make sure. Still no response. Any suggestions?