Skip to Content
0
Former Member
Jun 01, 2005 at 12:16 AM

BDc Screen Change.

33 Views

Hi,

I have a Bdc program, I am sending my code. I just wants material and plant in selectin scree. I donot want

create session, call transaction, Nodata Indicator and SMALLLOG. I want to pass processing mode as 'A', Update Mode as 'S' and Nodata Indicator as '/'.

Please help me doing this.

Thanks

neelu.

 

report ZMM_3030_SOURCE_LIST_LOAD

no standard page heading line-size 255.

include bdcrecx1.

tables: eina, eine, eord.

DATA: BEGIN OF it_eord OCCURS 0,

matnr LIKE eord-matnr,

werks LIKE eord-werks,

vdatu LIKE eord-vdatu,

  • bdatu LIKE eord-bdatu,

lifnr LIKE eord-lifnr,

  • ekorg LIKE eord-ekorg,

  • flifn LIKE eord-flifn,

  • autet LIKE eord-autet,

END OF it_eord.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

SELECT-OPTIONS: s_matnr for eina-matnr.

parameters: p_werks like eine-werks.

SELECTION-SCREEN END OF BLOCK b1.

start-of-selection.

PERFORM get_sourcelist_data.

DATA: l_vdatu like sy-datum.

LOOP AT it_eord.

PERFORM bdc_dynpro USING 'SAPLMEOR' '0200'.

PERFORM bdc_field USING 'BDC_CURSOR' 'EORD-MATNR'.

PERFORM bdc_field USING 'BDC_OKCODE' '/00'.

PERFORM bdc_field USING 'EORD-MATNR' it_eord-matnr.

PERFORM bdc_field USING 'EORD-WERKS' '3030'.

PERFORM bdc_dynpro USING 'SAPLMEOR' '0205'.

PERFORM bdc_field USING 'BDC_CURSOR' 'EORD-AUTET(01)'.

PERFORM bdc_field USING 'BDC_OKCODE' '=BU'.

perform sub_format_date using it_eord-vdatu changing l_vdatu.

PERFORM bdc_field USING 'EORD-VDATU(01)' l_vdatu.

PERFORM bdc_field USING 'EORD-BDATU(01)' '12319999'.

PERFORM bdc_field USING 'EORD-LIFNR(01)' it_eord-lifnr.

PERFORM bdc_field USING 'EORD-EKORG(01)' '9000'.

PERFORM bdc_field USING 'RM06W-FESKZ(01)' 'X'.

PERFORM bdc_field USING 'EORD-AUTET(01)' '1'.

PERFORM bdc_transaction USING 'ME01'.

ENDLOOP.

&----


*& Form get_sourcelist_data

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM get_sourcelist_data .

SELECT matnr

werks

vdatu

  • bdatu

lifnr

  • ekorg

  • flifn

  • autet

FROM eord

INTO CORRESPONDING FIELDS OF TABLE it_eord

WHERE werks = p_werks

AND matnr in s_matnr.

ENDFORM. " get_purchlist_data

*&----


*

*& Form sub_format_date

*&----


*

form sub_format_date using p_date_in changing p_date_out.

data: l_datfm like usr01-datfm, l_day(2), l_month(2), l_year(4).

l_year = p_date_in(4).

l_month = p_date_in+4(2).

l_day = p_date_in+6(2).

select single datfm from usr01 into l_datfm

where bname = sy-uname.

  • case l_datfm.

  • when '1'. "DDMMYYYY

  • concatenate l_day l_month l_year into p_date_out.

  • when '2' or '3'. "MMDDYYYY

concatenate l_month l_day l_year into p_date_out.

  • when '4' or '5' or '6'. "YYYYMMDD

  • concatenate l_year l_month l_day into p_date_out.

  • endcase.

endform. " sub_format_date