Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Import/Export dynpro not working

Former Member
0 Likes
1,445

IMPORT DYNPRO h f e m ID id

http://help.sap.com/abapdocu_70/en/ABAPIMPORT_DYNPRO.htm

I would like to use IMPORT DYNPRO to import screen attributes and program flow and then perform necessary changes and export/generate the modified screen.

well i used the sample from http://www.sapfans.com/sapfans/repos/poonam.htm, but regardless of how many times I tried, I couldn't get it to work. I'm still stuck at the first step, IMPORT DYNPRO will return sy-subrc = 4 (screen does not exist) no matter what program/screen I use.

Any idea?, Thanks

Edited by: afro100 on Oct 22, 2009 9:45 AM

Edited by: afro100 on Oct 25, 2009 8:24 AM

6 REPLIES 6
Read only

Former Member
0 Likes
922

> IMPORT DYNPRO Syntax Diagram

>This statement is for internal use only.

>It must not be used in application programs.

why are you using that?

in you program, just declare the same variable names of same type as defined in the dynpro.

they will automatically be bound.

Read only

0 Likes
922

I want to determine the number of rows in table control and also would like to learn more about dialog programming.

what do you mean by same variable names in the dynpro?

i use this as my reference http://www.sapfans.com/sapfans/repos/poonam.htm .

Read only

0 Likes
922

what do you put in a table control? a internal table... or a database table name... right?

that has a name lets say.. gt_itab .. or if its from ddic then lets say VBAK.. like this... !!!!

so in your dialogue program(i am not talking about the flow logic, i am talking about the se38 module pool program here) .. define those internal tables.. or database tables..

if you have used directly like VBAK, then in your program define,, :

TABLES : VBAK.

if its an internal table.. then it must have already been declared in your module pool program..

so to count number of lines,,,

use

DESCRIBE TABLE GT_ITAB LINES LINE.

Read only

0 Likes
922

Ok, my question isn't clear enough so I will try to get my point across with this one , I need to determine the number of visible lines for TC of a given screen in runtime for batch input processing. Since table control size varies from system to system and thus produce inconsistencies like 'no batch input data'.

http://www.sapfans.com/sapfans/repos/poonam.htm provides the sample i can run it but can't really do anything with it (always returns sy-subrc = 4 (indicates the specified screen doesn't exist)).

Edited by: afro100 on Oct 26, 2009 6:39 AM

Edited by: afro100 on Oct 27, 2009 1:23 PM

Edited by: afro100 on Oct 28, 2009 7:52 AM

Read only

0 Likes
922

Aha, I found the solution already, the field that contains the program name should be of a specific size

so I changed program(8) to program(40) and that solves all the problems

Read only

Former Member
0 Likes
922

See the following example

Double click on the method name; on the editor write the following code:

METHOD onactionaction_find .

DATA: node_node_vbak TYPE REF TO if_wd_context_node,

elem_node_vbak TYPE REF TO if_wd_context_element,

stru_node_vbak TYPE if_input_view=>element_node_vbak .

  • navigate from <CONTEXT> to <NODE_VBAK> via lead selection

node_node_vbak = wd_context->get_child_node( name = if_input_view=>wdctx_node_vbak ).

  • get element via lead selection

elem_node_vbak = node_node_vbak->get_element( ).

  • get all declared attributes

elem_node_vbak->get_static_attributes(

IMPORTING static_attributes = stru_node_vbak ).

DATA: ls_where(72) TYPE c,

lt_where LIKE TABLE OF ls_where,

lt_vbak TYPE STANDARD TABLE OF zstr_vbak.

  • create where condition

IF NOT stru_node_vbak-vbeln EQ ''.

CONCATENATE 'VBELN = ''' stru_node_vbak-vbeln '''' INTO ls_where.

APPEND ls_where TO lt_where.

ENDIF.

IF NOT stru_node_vbak-erdat EQ '00000000'.

CONCATENATE 'ERDAT = ''' stru_node_vbak-erdat '''' INTO ls_where.

IF stru_node_vbak-vbeln NE ''.

CONCATENATE 'AND' ls_where INTO ls_where SEPARATED BY space.

ENDIF.

APPEND ls_where TO lt_where.

ENDIF.

SELECT VBELN ERDAT ERZET ERNAM ANGDT BNDDT AUDAT VBTYP TRVOG AUART

AUGRU GWLDT SUBMI LIFSK FAKSK NETWR WAERK VKORG VTWEG SPART

VKGRP VKBUR GSBER GSKST GUEBG GUEEN KNUMV

FROM vbak INTO TABLE lt_vbak WHERE (lt_where).

DATA:

node_node_alv TYPE REF TO if_wd_context_node,

stru_node_alv TYPE if_input_view=>element_node_alv .

  • navigate from <CONTEXT> to <NODE_ALV> via lead selection

node_node_alv = wd_context->get_child_node( name = if_input_view=>wdctx_node_alv ).

  • get all declared attributes

node_node_alv->bind_table( lt_vbak ).

ENDMETHOD